[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / outofbound-notwork.c
blob22ccd9e2c913da20483b50880e5bbdbd587fb16c
1 // RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-checker=core,alpha.security.ArrayBound -analyzer-store=region -verify %s
2 // XFAIL: *
4 // Once we better handle modeling of sizes of VLAs, we can pull this back
5 // into outofbound.c.
7 void sizeof_vla(int a) {
8 if (a == 5) {
9 char x[a];
10 int y[sizeof(x)];
11 y[4] = 4; // no-warning
12 y[5] = 5; // expected-warning{{out-of-bound}}
16 void sizeof_vla_2(int a) {
17 if (a == 5) {
18 char x[a];
19 int y[sizeof(x) / sizeof(char)];
20 y[4] = 4; // no-warning
21 y[5] = 5; // expected-warning{{out-of-bound}}
25 void sizeof_vla_3(int a) {
26 if (a == 5) {
27 char x[a];
28 int y[sizeof(*&*&*&x)];
29 y[4] = 4; // no-warning
30 y[5] = 5; // expected-warning{{out-of-bound}}