From: Ted Kremenek Date: Mon, 6 Oct 2008 18:43:53 +0000 (+0000) Subject: Don't use DeclStmt::getDecl(); this will eventually disappear. Just fetch the first... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8369a8bdd6fe999de05be7c42af49aaa73da7855;p=clang Don't use DeclStmt::getDecl(); this will eventually disappear. Just fetch the first decl using the DeclStmt::decl_iterator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57194 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 115d265dde..1c3a170a56 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -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(D)) return;