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 115d265..1c3a170 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1484,10 +1484,8 @@
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;