[clang] [NFC][analyzer] Add regression tests from bisection commits to the CSA's test suite (PR #241058)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 11 02:40:22 PST 2026
================
@@ -260,3 +260,17 @@ void onlyLoopConditions(int arg) {
clang_analyzer_dump(i); // expected-warning {{1}} expected-warning {{2}} expected-warning {{3}} expected-warning {{4}}
}
+
+void GH20099(const unsigned char n) {
+
+ int buf[2][4] = {{0,0,0,0},{0,0,0,0}};
+ unsigned char j,k,l,x;
+
+ for (l = n - 1; l >= 1; l--)
+ x = 0;
+
+ for (j = n - 1; j >= 1; j--) {
+ for (k = 0; k <= j - 1; k++)
+ x = buf[k][j]; // no-warning
----------------
steakhal wrote:
Similar case. However, here at least I have an idea of what the warning was - likely an OOB access FP, but it's still not clear to me why it was a FP.
https://github.com/llvm/llvm-project/pull/241058
More information about the cfe-commits
mailing list