r329445 - Revert "[analyzer] Remove an unused variable"
George Karpenkov via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 6 12:14:05 PDT 2018
Author: george.karpenkov
Date: Fri Apr 6 12:14:05 2018
New Revision: 329445
URL: http://llvm.org/viewvc/llvm-project?rev=329445&view=rev
Log:
Revert "[analyzer] Remove an unused variable"
This reverts commit 2fa3e3edc4ed6547cc4ce46a8c79d1891a5b3b36.
Removed the wrong variable.
Modified:
cfe/trunk/lib/Analysis/LiveVariables.cpp
Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/LiveVariables.cpp?rev=329445&r1=329444&r2=329445&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
+++ cfe/trunk/lib/Analysis/LiveVariables.cpp Fri Apr 6 12:14:05 2018
@@ -381,7 +381,7 @@ void TransferFunctions::VisitBlockExpr(B
void TransferFunctions::VisitDeclRefExpr(DeclRefExpr *DR) {
const Decl* D = DR->getDecl();
bool InAssignment = LV.inAssignment[DR];
- if (isa<BindingDecl>(D)) {
+ if (const auto *BD = dyn_cast<BindingDecl>(D)) {
if (!InAssignment)
val.liveBindings = LV.BSetFact.add(val.liveBindings, BD);
} else if (const auto *VD = dyn_cast<VarDecl>(D)) {
More information about the cfe-commits
mailing list