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

lib/AST/StmtDumper.cpp

index a0af132bc4033960bfc790c325db85c0cbdceef2..dd92e84e9d271fdccdcc2057c74bbbcd5c34acbd 100644 (file)
@@ -243,7 +243,9 @@ void StmtDumper::DumpDeclarator(Decl *D) {
 void StmtDumper::VisitDeclStmt(DeclStmt *Node) {
   DumpStmt(Node);
   fprintf(F,"\n");
-  for (ScopedDecl *D = Node->getDecl(); D; D = D->getNextDeclarator()) {
+  for (DeclStmt::decl_iterator DI = Node->decl_begin(), DE = Node->decl_end();
+       DI != DE; ++DI) {
+    ScopedDecl* D = *DI;
     ++IndentLevel;
     Indent();
     fprintf(F, "%p ", (void*) D);