[PATCH] D126406: [analyzer] Return from reAssume if State is posteriorly overconstrained

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 12:41:07 PDT 2022


martong added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:2547
   if (Constraint->encodesFalseRange())
     return State->assume(DefinedVal, false);
 
----------------
I am wondering, that maybe it would be better to check for `isPosteriorlyOverconstrained` here. Because only `State->assume` can return such States, and by checking it here, we could spare some instructions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126406



More information about the cfe-commits mailing list