[clang] [clang][StaticAnalysis] Fix an false negative bug in handling '__builtin*overflow' (PR #214553)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 13:51:16 PDT 2026
================
@@ -215,3 +215,12 @@ void test_add_overflow_s111(void) {
clang_analyzer_warnIfReached(); // no-warning: we always get an overflow, thus choose the other branch
}
+
+void test_add_overflow_scratch_type_too_narrow(void) {
+ int a = 32767, b = 32767;
+ signed char res;
+
+ // This is a false negative. 32767 + 32767 == 65534, which does not
----------------
steakhal wrote:
If this is a FN, why do we have a report?
https://github.com/llvm/llvm-project/pull/214553
More information about the cfe-commits
mailing list