[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 26 09:48:23 PDT 2021


ASDenysPetrov requested changes to this revision.
ASDenysPetrov added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:44-49
+    // Handle adjustment with non-comparison ops.
+    const llvm::APSInt &Zero = getBasicVals().getValue(0, SIE->getType());
+    if (Assumption) {
+      return assumeSymRel(State, SIE, BO_NE, Zero);
+    }
+    return assumeSymRel(State, SIE, BO_EQ, Zero);
----------------
Actually what you are trying to do here is already inside `assumeSymUnsupported` and it will work for all `SymIntExpr`.
Please, proveide a test case which works with `assumeSymRel` and doesn't with `asume` from the previous change. That is what we are trying to fix here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112296



More information about the cfe-commits mailing list