summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-17 16:55:25 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-17 16:55:25 +0000
commitae20647f175485633a39daf900a8967a66d34e67 (patch)
tree915fd2eb7587d3d5749a4d6483012716254c6e70 /lib/Sema/SemaCodeComplete.cpp
parent8e858e99a3dcbcab799cbfbd15888fe72c8f224d (diff)
[C++11] Replacing Scope iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index fe32382226..d44c04b480 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -4335,9 +4335,8 @@ void Sema::CodeCompleteLambdaIntroducer(Scope *S, LambdaIntroducer &Intro,
// Look for other capturable variables.
for (; S && !isNamespaceScope(S); S = S->getParent()) {
- for (Scope::decl_iterator D = S->decl_begin(), DEnd = S->decl_end();
- D != DEnd; ++D) {
- VarDecl *Var = dyn_cast<VarDecl>(*D);
+ for (const auto *D : S->decls()) {
+ const auto *Var = dyn_cast<VarDecl>(D);
if (!Var ||
!Var->hasLocalStorage() ||
Var->hasAttr<BlocksAttr>())