[cfe-commits] r57187 - /cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h

Ted Kremenek kremenek at apple.com
Mon Oct 6 11:36:53 PDT 2008


Author: kremenek
Date: Mon Oct  6 13:36:52 2008
New Revision: 57187

URL: http://llvm.org/viewvc/llvm-project?rev=57187&view=rev
Log:
Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon be removed).

Modified:
    cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h

Modified: cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h?rev=57187&r1=57186&r2=57187&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h (original)
+++ cfe/trunk/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h Mon Oct  6 13:36:52 2008
@@ -42,7 +42,9 @@
   }
   
   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))





More information about the cfe-commits mailing list