]> granicus.if.org Git - clang/commitdiff
In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped...
authorTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:42:27 +0000 (18:42 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:42:27 +0000 (18:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57192 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index f70b86661df52080d3f766269c2890046b9eda5f..024fb0a6599d6560a38c16a1406817ad04f2a379 100644 (file)
@@ -482,9 +482,9 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) {
 }
 
 void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) {
-  for (const ScopedDecl *Decl = S.getDecl(); Decl; 
-       Decl = Decl->getNextDeclarator())
-    EmitDecl(*Decl);
+  for (DeclStmt::const_decl_iterator I = S.decl_begin(), E = S.decl_end();
+       I != E; ++I)
+    EmitDecl(**I);
 }
 
 void CodeGenFunction::EmitBreakStmt() {