From: Ted Kremenek Date: Mon, 6 Oct 2008 18:36:52 +0000 (+0000) Subject: Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e27b8bb3f59e328e6f6c75104f86e354065438c;p=clang Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon be removed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57187 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h b/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h index 754bbb4fb9..49850a7d6f 100644 --- a/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h +++ b/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h @@ -42,7 +42,9 @@ public: } void VisitDeclStmt(DeclStmt* DS) { - for (ScopedDecl* D = DS->getDecl(); D != NULL; D = D->getNextDeclarator()) { + for (DeclStmt::decl_iterator DI = DS->decl_begin(), DE = DS->decl_end(); + DI != DE; ++DI) { + ScopedDecl* D = *DI; static_cast(this)->VisitScopedDecl(D); // Visit the initializer. if (VarDecl* VD = dyn_cast(D))