[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeCompletion / macros.c
blob3cbad800202ca0105c2f185eae1e9e783bad2478
1 enum Color {
2 Red, Green, Blue
3 };
5 struct Point {
6 float x, y, z;
7 enum Color color;
8 };
10 void test(struct Point *p) {
11 // RUN: %clang_cc1 -include %S/Inputs/macros.h -fsyntax-only -code-completion-macros -code-completion-at=%s:12:14 %s -o - | FileCheck -check-prefix=CC1 %s
12 switch (p->IDENTITY(color)) {
13 // RUN: %clang_cc1 -include %S/Inputs/macros.h -fsyntax-only -code-completion-macros -code-completion-at=%s:14:10 %s -o - | FileCheck -check-prefix=CC2 %s
14 case
16 // RUN: %clang_cc1 -include %S/Inputs/macros.h -fsyntax-only -code-completion-macros -code-completion-at=%s:17:8 %s -o - | FileCheck -check-prefix=CC3 %s
17 #ifdef Q
18 #endif
20 // Run the same tests, this time with macros loaded from the PCH file.
21 // RUN: %clang_cc1 -emit-pch -o %t %S/Inputs/macros.h
22 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -code-completion-macros -code-completion-at=%s:12:14 %s -o - | FileCheck -check-prefix=CC1 %s
23 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -code-completion-macros -code-completion-at=%s:14:10 %s -o - | FileCheck -check-prefix=CC2 %s
24 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -code-completion-macros -code-completion-at=%s:17:8 %s -o - | FileCheck -check-prefix=CC3 %s
26 // CC1: color
27 // CC1: x
28 // CC1: y
29 // CC1: z
31 // CC2: BAR(<#X#>, <#Y#>)
32 // CC2: Blue
33 // CC2: FOO
34 // CC2: Green
35 // CC2: IDENTITY(<#X#>)
36 // CC2: MACRO_WITH_HISTORY(<#X#>, <#Y#>)
37 // CC2: Red
38 // CC2: WIBBLE
40 // CC3: BAR
41 // CC3: DEAD_MACRO
42 // CC3: FOO
43 // CC3: IDENTITY
44 // CC3: MACRO_WITH_HISTORY
45 // CC3: WIBBLE