summaryrefslogtreecommitdiffstats
path: root/clang/Analysis/LiveVariables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Analysis/LiveVariables.cpp')
-rw-r--r--clang/Analysis/LiveVariables.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/Analysis/LiveVariables.cpp b/clang/Analysis/LiveVariables.cpp
index 6b25f9eee60..bf4437470e3 100644
--- a/clang/Analysis/LiveVariables.cpp
+++ b/clang/Analysis/LiveVariables.cpp
@@ -252,7 +252,10 @@ void LivenessTFuncs::VisitAssign(BinaryOperator* B) {
// We only need to register kills once, so we check if this block
// has been previously processed.
if (!blockPreviouslyProcessed)
- V.AddKill(CurrentStmt,DR);
+ V.AddKill(CurrentStmt,DR);
+
+ if (B->getOpcode() != BinaryOperator::Assign)
+ Visit(LHS);
}
else
Visit(LHS);
OpenPOWER on IntegriCloud