summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAttr.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-06-23 00:15:04 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-06-23 00:15:04 +0000
commitf7e3609f77936044893fc2a69981d6ba212e3728 (patch)
tree9c00ae8b3cf60810afa33e3957c2e7e27135fd61 /clang/lib/Sema/SemaAttr.cpp
parentd1fbf48566ae0ff14ea2b935cbf3cbbba40a6d28 (diff)
downloadbcm5719-llvm-f7e3609f77936044893fc2a69981d6ba212e3728.tar.gz
bcm5719-llvm-f7e3609f77936044893fc2a69981d6ba212e3728.zip
Use ranges to concisely express iteration
No functional change is intended, this should just clean things up a little. llvm-svn: 273522
Diffstat (limited to 'clang/lib/Sema/SemaAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaAttr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp
index 8933399340d..0d7fba5c670 100644
--- a/clang/lib/Sema/SemaAttr.cpp
+++ b/clang/lib/Sema/SemaAttr.cpp
@@ -222,8 +222,9 @@ void Sema::PragmaStack<ValueType>::Act(SourceLocation PragmaLocation,
else if (Action & PSK_Pop) {
if (!StackSlotLabel.empty()) {
// If we've got a label, try to find it and jump there.
- auto I = std::find_if(Stack.rbegin(), Stack.rend(),
- [&](const Slot &x) { return x.StackSlotLabel == StackSlotLabel; });
+ auto I = llvm::find_if(llvm::reverse(Stack), [&](const Slot &x) {
+ return x.StackSlotLabel == StackSlotLabel;
+ });
// If we found the label so pop from there.
if (I != Stack.rend()) {
CurrentValue = I->Value;
OpenPOWER on IntegriCloud