[PATCH] D125379: [analyzer][solver] Do not negate unsigned ranges
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 11 05:39:21 PDT 2022
steakhal added a comment.
Seems reasonable.
================
Comment at: clang/test/Analysis/constraint_manager_negate_difference.c:145-148
+ // FIXME only the TRUE case should appear. But it is better to be
+ // conservative than faulty.
+ clang_analyzer_eval(n - m == 1); // expected-warning{{TRUE}} expected-warning{{FALSE}}
+ clang_analyzer_eval(n - m != 1); // expected-warning{{FALSE}} expected-warning{{TRUE}}
----------------
It's not immediately clear what you refer to by the `TRUE` case. The two evals the opposite condition, consequently one of them should be `FALSE`. Same for the next case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125379/new/
https://reviews.llvm.org/D125379
More information about the cfe-commits
mailing list