[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.

llvm-svn: 204052
This commit is contained in:
Aaron Ballman
2014-03-17 16:55:25 +00:00
parent 650459721a
commit 35c5495bbb
4 changed files with 10 additions and 13 deletions

View File

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