[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 7 06:15:15 PDT 2017


baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:583
+            newRhs = BasicVals.evalAPSInt(BO_Add, *lInt, *rInt);
+            reverse = (lop == BO_Add);
+          } else {
----------------
NoQ wrote:
> I'm afraid we may step into `BO_Mul` here, or something like that. Could you add a check somewhere that all the operations involved are either `BO_Add` or `BO_Sub`?
I can remember adding BinaryOperator::isAdditiveOp() at the very beginning, maybe I accidentally deleted it.


https://reviews.llvm.org/D35109





More information about the cfe-commits mailing list