[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / test-variably-modified-types.c
blob1df57affad4155a34b459af37954b15f1069d9c7
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyze-function=testVariablyModifiedTypes -verify %s
3 // Test that we process variably modified type correctly - the call graph construction should pick up function_with_bug while recursively visiting test_variably_modifiable_types.
4 unsigned getArraySize(int *x) {
5 if (!x)
6 return *x; // expected-warning {{Dereference of null pointer}}
7 return 1;
10 int testVariablyModifiedTypes(int *x) {
11 int mytype[getArraySize(x)];
12 return 0;