================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to