[llvm] r188717 - Make sure that pop_back_val() result is used.
Jakub Staszak
kubastaszak at gmail.com
Mon Aug 19 15:12:00 PDT 2013
Author: kuba
Date: Mon Aug 19 17:12:00 2013
New Revision: 188717
URL: http://llvm.org/viewvc/llvm-project?rev=188717&view=rev
Log:
Make sure that pop_back_val() result is used.
Modified:
llvm/trunk/include/llvm/ADT/SetVector.h
llvm/trunk/include/llvm/ADT/SmallVector.h
Modified: llvm/trunk/include/llvm/ADT/SetVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SetVector.h?rev=188717&r1=188716&r2=188717&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SetVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SetVector.h Mon Aug 19 17:12:00 2013
@@ -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;
Modified: llvm/trunk/include/llvm/ADT/SmallVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=188717&r1=188716&r2=188717&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallVector.h Mon Aug 19 17:12:00 2013
@@ -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
More information about the llvm-commits
mailing list