summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-08 18:45:14 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-08 18:45:14 +0000
commit23a6dcb365f5c6a9b803e9ab08088c67e2e55780 (patch)
tree00673f5d3476b95f4ce1691dbc32ba36c063bb4a /clang/lib/Sema/SemaDecl.cpp
parent951b235be21c7dad91f5036f330560a9a0807c17 (diff)
downloadbcm5719-llvm-23a6dcb365f5c6a9b803e9ab08088c67e2e55780.tar.gz
bcm5719-llvm-23a6dcb365f5c6a9b803e9ab08088c67e2e55780.zip
[C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203353
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 40eb1d5271f..38930bda1f7 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9630,10 +9630,9 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D) {
// Similarly, dive into enums and fish their constants out, making them
// accessible in this scope.
- if (EnumDecl *ED = dyn_cast<EnumDecl>(D)) {
- for (EnumDecl::enumerator_iterator EI = ED->enumerator_begin(),
- EE = ED->enumerator_end(); EI != EE; ++EI)
- PushOnScopeChains(*EI, FnBodyScope, /*AddToContext=*/false);
+ if (auto *ED = dyn_cast<EnumDecl>(D)) {
+ for (auto *EI : ED->enumerators())
+ PushOnScopeChains(EI, FnBodyScope, /*AddToContext=*/false);
}
}
}
OpenPOWER on IntegriCloud