diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-13 17:33:24 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-09-13 17:33:24 +0000 |
commit | cbe40cfe96a6bb3f2da56445269c2c71e55e0e56 (patch) | |
tree | 2e8de837bd5fe4285004d64f3a7b1dbf5d57cbed /include/llvm/ADT/SmallPtrSet.h | |
parent | e946a9ceda24775153c2c869e30afab058088238 (diff) | |
download | external_llvm-cbe40cfe96a6bb3f2da56445269c2c71e55e0e56.zip external_llvm-cbe40cfe96a6bb3f2da56445269c2c71e55e0e56.tar.gz external_llvm-cbe40cfe96a6bb3f2da56445269c2c71e55e0e56.tar.bz2 |
Add warn_unused_result to empty() on various containers.
empty() doesn't actually empty out the container, making this a common typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/SmallPtrSet.h')
-rw-r--r-- | include/llvm/ADT/SmallPtrSet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index 8c73041..bd0d883 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -71,7 +71,7 @@ protected: ~SmallPtrSetImpl(); public: - bool empty() const { return size() == 0; } + bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { return size() == 0; } unsigned size() const { return NumElements; } void clear() { |