[C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops.

llvm-svn: 203947
This commit is contained in:
Aaron Ballman
2014-03-14 17:01:24 +00:00
parent edc1753ba3
commit 535bbcccb1
23 changed files with 58 additions and 82 deletions

View File

@@ -961,11 +961,9 @@ LocalScope* CFGBuilder::addLocalScopeForDeclStmt(DeclStmt *DS,
if (!BuildOpts.AddImplicitDtors)
return Scope;
for (DeclStmt::decl_iterator DI = DS->decl_begin(), DE = DS->decl_end()
; DI != DE; ++DI) {
if (VarDecl *VD = dyn_cast<VarDecl>(*DI))
for (auto *DI : DS->decls())
if (VarDecl *VD = dyn_cast<VarDecl>(DI))
Scope = addLocalScopeForVarDecl(VD, Scope);
}
return Scope;
}