From: George Karpenkov Date: Fri, 6 Apr 2018 19:14:05 +0000 (+0000) Subject: Revert "[analyzer] Remove an unused variable" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53c3ad867390dcd18b1cd5467656867b97291ba6;p=clang Revert "[analyzer] Remove an unused variable" This reverts commit 2fa3e3edc4ed6547cc4ce46a8c79d1891a5b3b36. Removed the wrong variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329445 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp index de2836d23b..b8ea1e9600 100644 --- a/lib/Analysis/LiveVariables.cpp +++ b/lib/Analysis/LiveVariables.cpp @@ -381,7 +381,7 @@ void TransferFunctions::VisitBlockExpr(BlockExpr *BE) { void TransferFunctions::VisitDeclRefExpr(DeclRefExpr *DR) { const Decl* D = DR->getDecl(); bool InAssignment = LV.inAssignment[DR]; - if (isa(D)) { + if (const auto *BD = dyn_cast(D)) { if (!InAssignment) val.liveBindings = LV.BSetFact.add(val.liveBindings, BD); } else if (const auto *VD = dyn_cast(D)) {