From f8a2765fb7d1e6c4c2939397a6425476e68ef03c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 6 Oct 2008 18:36:52 +0000 Subject: [PATCH] Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon be removed). llvm-svn: 57187 --- clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h b/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h index 754bbb4fb9ad..49850a7d6fb0 100644 --- a/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h +++ b/clang/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))