[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
Wed Apr 26 07:09:56 PDT 2017
xazax.hun added a comment.
I only found two nits otherwise looks good to me.
================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h:46
+bool exprComparesTo(SVal LHSVal, BinaryOperatorKind ComparisonOp, SVal RHSVal,
+ ProgramStateRef State);
----------------
Right now the name of this function is exprComparesTo, but none of its arguments are expressions. You should either rename it to svalComparesTo, or use expr as its arguments.
================
Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:116
+ return false;
+ ConstraintManager &CM = State->getConstraintManager();
+ ProgramStateRef StTrue, StFalse;
----------------
Any reason why do you get the constraint manager and not using ProgramState::assume?
Repository:
rL LLVM
https://reviews.llvm.org/D30295
More information about the cfe-commits
mailing list