]> granicus.if.org Git - clang/commitdiff
Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon...
authorTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:36:52 +0000 (18:36 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:36:52 +0000 (18:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57187 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h

index 754bbb4fb9ad3a34df0014da8900ebf92f4c188d..49850a7d6fb0eb39949ae5562f21afef2c25676a 100644 (file)
@@ -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<ImplClass*>(this)->VisitScopedDecl(D); 
       // Visit the initializer.
       if (VarDecl* VD = dyn_cast<VarDecl>(D))