From 827ecb0db9225c98f08cfc991598210bcf0045dd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 29 Mar 2009 16:35:09 +0000 Subject: [PATCH] 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 --- include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.40.0