From: Chris Lattner Date: Sun, 29 Mar 2009 16:35:09 +0000 (+0000) Subject: DeclRefExpr refers to one decl, not all the declarators in a declaration. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=827ecb0db9225c98f08cfc991598210bcf0045dd;p=clang DeclRefExpr refers to one decl, not all the declarators in a declaration. Ted, please check this, this change causes no regression tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68001 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h b/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h index 89b365c5b6..ee79c51703 100644 --- a/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h +++ b/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h @@ -37,8 +37,7 @@ class CFGRecStmtDeclVisitor : public CFGRecStmtVisitor { public: void VisitDeclRefExpr(DeclRefExpr* DR) { - for (Decl* D = DR->getDecl(); D != NULL; D = D->getNextDeclarator()) - static_cast(this)->VisitDecl(D); + static_cast(this)->VisitDecl(DR->getDecl()); } void VisitDeclStmt(DeclStmt* DS) {