[clang] [NFC][analyzer] Add regression tests from bisection commits to the CSA's test suite (PR #241058)
Benedek Kaibas via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 02:12:21 PST 2026
================
@@ -260,3 +260,27 @@ void onlyLoopConditions(int arg) {
clang_analyzer_dump(i); // expected-warning {{1}} expected-warning {{2}} expected-warning {{3}} expected-warning {{4}}
}
+
+// In Clang 19.1.0 the analyzer reported that:
+// "Assigned value is garbage or undefined" for `int buf [2][4]`. Since it is
+// possible to receive a large number for `n` the report itself is plausible.
+// #119388 ensures that if the loop condition is opaque and there were at
+// least two iterations, the analyzer does not make the assumption that it
+// can enter the third iteration.
+// Before Clang 20.1.0 the plausbile was present because when the loop
----------------
benedekaibas wrote:
Thanks for noticing it, applied changes!
https://github.com/llvm/llvm-project/pull/241058
More information about the cfe-commits
mailing list