]> granicus.if.org Git - clang/commitdiff
DeclRefExpr refers to one decl, not all the declarators in a declaration.
authorChris Lattner <sabre@nondot.org>
Sun, 29 Mar 2009 16:35:09 +0000 (16:35 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 29 Mar 2009 16:35:09 +0000 (16:35 +0000)
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

include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h

index 89b365c5b648cad9cacb9a527116364b713f1872..ee79c517030f94bda11083d742bd5bae3e38daa8 100644 (file)
@@ -37,8 +37,7 @@ class CFGRecStmtDeclVisitor : public CFGRecStmtVisitor<ImplClass> {
 public:  
 
   void VisitDeclRefExpr(DeclRefExpr* DR) {
-    for (Decl* D = DR->getDecl(); D != NULL; D = D->getNextDeclarator())
-      static_cast<ImplClass*>(this)->VisitDecl(D); 
+    static_cast<ImplClass*>(this)->VisitDecl(DR->getDecl()); 
   }
   
   void VisitDeclStmt(DeclStmt* DS) {