[PATCH] D99344: [Analyzer] Track RValue expressions

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 26 03:18:09 PDT 2021


steakhal added a comment.

Some minor logical issues inline.



================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1944-1945
+    return;
+  if (!BO->isMultiplicativeOp())
+    return;
+
----------------
There are only 3 multiplicative operators:
```
BINARY_OPERATION(Mul, "*")
BINARY_OPERATION(Div, "/")
BINARY_OPERATION(Rem, "%")
```
So, the opcode can never be `BO_MulAssign` later.
The comment for the else block is also inaccurate for the same reason.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99344/new/

https://reviews.llvm.org/D99344



More information about the cfe-commits mailing list