NoQ added inline comments.
================ Comment at: clang/test/Analysis/constant-folding.c:127-128 + if (a > 10) { + clang_analyzer_eval((a & 1) <= 1); // expected-warning{{FALSE}} + clang_analyzer_eval((a & 1) > 1); // expected-warning{{FALSE}} + } ---------------- vsavchenko wrote: > NoQ wrote: > > How can both of these be false? o.o > Yeah :) I realized how weird it is. > Anything is possible in the land of infeasible ranges. > > I changed a comment there to address this I mean, this pretty much never happened before. How are you not tripping on [[ https://github.com/llvm/llvm-project/blob/1a4421a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h#L100 | this assert ]]? (probably it's simply been disabled in normal debug builds now that it's under "expensive checks") The correct thing to do is to detect the paradox earlier and mark the path as infeasible. What prevents us from doing it right away here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79232/new/ https://reviews.llvm.org/D79232 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits