[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 11 10:50:08 PDT 2020
xazax.hun added inline comments.
================
Comment at: clang/lib/Analysis/LiveVariables.cpp:326
void TransferFunctions::VisitBinaryOperator(BinaryOperator *B) {
+ if (LV.killAtAssign && B->getOpcode() == BO_Assign) {
+ if (const auto *DR = dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParens())) {
----------------
Do we actually need to specially handle `BO_Assign`? What about `+=` and other assignment operators? I know that the original code did not consider them, but I do not have a good intuition why.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87518/new/
https://reviews.llvm.org/D87518
More information about the cfe-commits
mailing list