Put an unused result attribute on SmallSet::empty()
authorAlp Toker <alp@nuanti.com>
Sat, 23 Nov 2013 23:06:20 +0000 (23:06 +0000)
committerAlp Toker <alp@nuanti.com>
Sat, 23 Nov 2013 23:06:20 +0000 (23:06 +0000)
This matches other empty() container functions in LLVM.

No actual usage problems discovered in this instance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195562 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SmallSet.h

index 5dfe924f6d783e105561f73f48c65a6d18bc6aa7..ecd3843cd0a7384d1b25c458e884ae8abc895866 100644 (file)
@@ -39,7 +39,10 @@ class SmallSet {
 public:
   SmallSet() {}
 
-  bool empty() const { return Vector.empty() && Set.empty(); }
+  bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const {
+    return Vector.empty() && Set.empty();
+  }
+
   unsigned size() const {
     return isSmall() ? Vector.size() : Set.size();
   }