Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon be removed).

llvm-svn: 57187
This commit is contained in:
Ted Kremenek 2008-10-06 18:36:52 +00:00
parent 151534a197
commit f8a2765fb7
1 changed files with 3 additions and 1 deletions

View 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))