Make sure that pop_back_val() result is used.

llvm-svn: 188717
This commit is contained in:
Jakub Staszak 2013-08-19 22:12:00 +00:00
parent 37ddd6bf63
commit ef4f3f31d3
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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