[PATCH] D121045: [analyzer][NFC] Merge similar conditional paths
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 7 00:51:18 PST 2022
steakhal requested changes to this revision.
steakhal added a comment.
This revision now requires changes to proceed.
Shadowing potential names is not a good idea.
BTW OpCodes are often abbreviated to `Op` in variable names in this context.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:110-111
break;
- if (BO->getOpcode() == BO_Assign) {
- Ex = BO->getRHS();
- continue;
- }
- if (BO->getOpcode() == BO_Comma) {
+ BinaryOperatorKind BO_AssignOrComma = BO->getOpcode();
+ if (BO_AssignOrComma == BO_Assign || BO_AssignOrComma == BO_Comma) {
Ex = BO->getRHS();
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121045/new/
https://reviews.llvm.org/D121045
More information about the cfe-commits
mailing list