[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)
Jan Korous via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 11:44:23 PST 2024
================
@@ -8,6 +8,5 @@
// main function
int main(int argc, char *argv[]) { // expected-warning{{'argv' is an unsafe pointer used for buffer access}}
char tmp;
- tmp = argv[5][5]; // expected-note{{used in buffer access here}} \
- expected-warning{{unsafe buffer access}}
----------------
jkorous-apple wrote:
I see, makes sense. I didn't realize that's what's happening and only saw warnings going missing in tests.
I would prefer changing the diagnostics structure in a separate patch and only suppressing the false positives for now.
Do you think we could do it that way?
https://github.com/llvm/llvm-project/pull/118249
More information about the cfe-commits
mailing list