vsavchenko added a comment.
Awesome! Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99343/new/
https://reviews.llvm.org/D99343
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
This revision was automatically updated to reflect the committed changes.
martong marked an inline comment as done.
Closed by commit rG015c39882ebc: [Analyzer] Infer 0 value when the divisible is
0 (bug fix) (authored by martong).
Changed prior to commit:
https://reviews.llvm.org/D99343?vs=
martong marked an inline comment as done.
martong added a comment.
Thanks for the review!
Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:655
return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
+ case BO_Div:
case BO_Rem:
vsavchenko accepted this revision.
vsavchenko added a comment.
This revision is now accepted and ready to land.
Looks great!
Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:655
return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
+ case BO_Di
martong added inline comments.
Comment at: clang/test/Analysis/zero-operands.c:43
+
+void test_0_divisible(int x, int y) {
+ int a = x < 0; // Eagerly bifurcate.
Note, this is the test that fails without this fix.
The preceding tests are here to demonstrate th
martong created this revision.
martong added reviewers: steakhal, NoQ, vsavchenko, Szelethus.
Herald added subscribers: ASDenysPetrov, Charusso, gamesh411, dkrupp,
donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware,
xazax.hun, whisperity.
martong requested review of this