From 4e27b8bb3f59e328e6f6c75104f86e354065438c 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57187 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.40.0