diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2013-08-19 22:12:00 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2013-08-19 22:12:00 +0000 |
commit | b937c55e93e9d52fa618b3488da04ff73182f3f9 (patch) | |
tree | 1edae99d9ab7aef98fcfe6a7307f4ad4b6520b30 /include | |
parent | aa22a4b002e9669138485dd415aa8b74bb60f37e (diff) | |
download | external_llvm-b937c55e93e9d52fa618b3488da04ff73182f3f9.zip external_llvm-b937c55e93e9d52fa618b3488da04ff73182f3f9.tar.gz external_llvm-b937c55e93e9d52fa618b3488da04ff73182f3f9.tar.bz2 |
Make sure that pop_back_val() result is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/SetVector.h | 2 | ||||
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h index d2f7286..5eda37c 100644 --- a/include/llvm/ADT/SetVector.h +++ b/include/llvm/ADT/SetVector.h @@ -170,7 +170,7 @@ public: vector_.pop_back(); } - T pop_back_val() { + T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { T Ret = back(); pop_back(); return Ret; diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 7ba0a71..0dc8904 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -427,7 +427,7 @@ public: this->grow(N); } - T pop_back_val() { + T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { #if LLVM_HAS_RVALUE_REFERENCES T Result = ::std::move(this->back()); #else |