[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 04:59:29 PDT 2017


xazax.hun added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:116
+    return false;
+  ConstraintManager &CM = State->getConstraintManager();
+  ProgramStateRef StTrue, StFalse;
----------------
danielmarjamaki wrote:
> xazax.hun wrote:
> > Any reason why do you get the constraint manager and not using ProgramState::assume?
> Mostly that it's just 1 call instead of 2. assumeDual() has some extra logic (early return , assertion). are there some special reason to use assume()?
Basically it would be a bit shorter, it also calls AssumeDual in the background.
See https://clang.llvm.org/doxygen/ProgramState_8h_source.html#l00652


Repository:
  rL LLVM

https://reviews.llvm.org/D30295





More information about the cfe-commits mailing list