[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:
@@ -851,11 +851,9 @@ void ConsumedStmtVisitor::VisitDeclRefExpr(const DeclRefExpr *DeclRef) {
|
||||
}
|
||||
|
||||
void ConsumedStmtVisitor::VisitDeclStmt(const DeclStmt *DeclS) {
|
||||
for (DeclStmt::const_decl_iterator DI = DeclS->decl_begin(),
|
||||
DE = DeclS->decl_end(); DI != DE; ++DI) {
|
||||
|
||||
if (isa<VarDecl>(*DI)) VisitVarDecl(cast<VarDecl>(*DI));
|
||||
}
|
||||
for (const auto *DI : DeclS->decls())
|
||||
if (isa<VarDecl>(DI))
|
||||
VisitVarDecl(cast<VarDecl>(DI));
|
||||
|
||||
if (DeclS->isSingleDecl())
|
||||
if (const VarDecl *Var = dyn_cast_or_null<VarDecl>(DeclS->getSingleDecl()))
|
||||
|
||||
Reference in New Issue
Block a user