]> granicus.if.org Git - clang/commitdiff
Don't use DeclStmt::getDecl(); this will eventually disappear. Just fetch the first...
authorTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:43:53 +0000 (18:43 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:43:53 +0000 (18:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57194 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index 115d265dde451f6aaeb6849ed1d5704f276c228d..1c3a170a5686c6ece53c341ade931689ad31ccba 100644 (file)
@@ -1484,10 +1484,8 @@ void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){
 
 void GRExprEngine::VisitDeclStmt(DeclStmt* DS, NodeTy* Pred, NodeSet& Dst) {  
 
-  // The CFG has one DeclStmt per Decl, so we don't need to walk the 
-  // Decl chain.
-  
-  ScopedDecl* D = DS->getDecl();
+  // The CFG has one DeclStmt per Decl.  
+  ScopedDecl* D = *DS->decl_begin();
   
   if (!D || !isa<VarDecl>(D))
     return;