[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / warn-null.c
blobda2d90d53417f02851ec0f95b7f5b32c1849a004
1 // RUN: %clang_cc1 %s -verify
3 #define SOME_ADDR (unsigned long long)0
5 // PR10837: Warn if a non-pointer-typed expression is folded to a null pointer
6 int *p = 0;
7 int *q = '\0'; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
8 int *r = (1 - 1); // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
9 void f(void) {
10 p = 0;
11 q = '\0'; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
12 r = 1 - 1; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
13 p = SOME_ADDR; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}