1 | // RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- -target x86_64-unknown-windows-msvc -fms-extensions -w | FileCheck --strict-whitespace %s |
2 | |
3 | #pragma comment(compiler, "compiler comment") |
4 | #pragma comment(exestr, "exestr comment") |
5 | #pragma comment(lib, "lib comment") |
6 | #pragma comment(linker, "linker comment") |
7 | #pragma comment(user, "user comment") |
8 | |
9 | #pragma detect_mismatch("name argument", "value argument") |
10 | |
11 | #pragma __debug(assert) |
12 | |
13 | #pragma message("message argument") |
14 | |
15 | #pragma warning(push, 1) |
16 | #pragma warning(pop) |
17 | #pragma warning(disable : 1 2 3 ; error : 4 5 6 ; suppress : 7 8 9) |
18 | |
19 | // CHECK: --- |
20 | // CHECK-NEXT: - Callback: PragmaDirective |
21 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:3:1" |
22 | // CHECK-NEXT: Introducer: PIK_HashPragma |
23 | // CHECK-NEXT: - Callback: PragmaComment |
24 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:3:9" |
25 | // CHECK-NEXT: Kind: compiler |
26 | // CHECK-NEXT: Str: compiler comment |
27 | // CHECK-NEXT: - Callback: PragmaDirective |
28 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:4:1" |
29 | // CHECK-NEXT: Introducer: PIK_HashPragma |
30 | // CHECK-NEXT: - Callback: PragmaComment |
31 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:4:9" |
32 | // CHECK-NEXT: Kind: exestr |
33 | // CHECK-NEXT: Str: exestr comment |
34 | // CHECK-NEXT: - Callback: PragmaDirective |
35 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:5:1" |
36 | // CHECK-NEXT: Introducer: PIK_HashPragma |
37 | // CHECK-NEXT: - Callback: PragmaComment |
38 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:5:9" |
39 | // CHECK-NEXT: Kind: lib |
40 | // CHECK-NEXT: Str: lib comment |
41 | // CHECK-NEXT: - Callback: PragmaDirective |
42 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:6:1" |
43 | // CHECK-NEXT: Introducer: PIK_HashPragma |
44 | // CHECK-NEXT: - Callback: PragmaComment |
45 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:6:9" |
46 | // CHECK-NEXT: Kind: linker |
47 | // CHECK-NEXT: Str: linker comment |
48 | // CHECK-NEXT: - Callback: PragmaDirective |
49 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:7:1" |
50 | // CHECK-NEXT: Introducer: PIK_HashPragma |
51 | // CHECK-NEXT: - Callback: PragmaComment |
52 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:7:9" |
53 | // CHECK-NEXT: Kind: user |
54 | // CHECK-NEXT: Str: user comment |
55 | // CHECK-NEXT: - Callback: PragmaDirective |
56 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:9:1" |
57 | // CHECK-NEXT: Introducer: PIK_HashPragma |
58 | // CHECK-NEXT: - Callback: PragmaDetectMismatch |
59 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:9:9" |
60 | // CHECK-NEXT: Name: name argument |
61 | // CHECK-NEXT: Value: value argument |
62 | // CHECK-NEXT: - Callback: PragmaDirective |
63 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:11:1" |
64 | // CHECK-NEXT: Introducer: PIK_HashPragma |
65 | // CHECK-NEXT: - Callback: PragmaDirective |
66 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:13:1" |
67 | // CHECK-NEXT: Introducer: PIK_HashPragma |
68 | // CHECK-NEXT: - Callback: PragmaMessage |
69 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:13:9" |
70 | // CHECK-NEXT: Namespace: |
71 | // CHECK-NEXT: Kind: PMK_Message |
72 | // CHECK-NEXT: Str: message argument |
73 | // CHECK-NEXT: - Callback: PragmaDirective |
74 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:15:1" |
75 | // CHECK-NEXT: Introducer: PIK_HashPragma |
76 | // CHECK-NEXT: - Callback: PragmaWarningPush |
77 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:15:9" |
78 | // CHECK-NEXT: Level: 1 |
79 | // CHECK-NEXT: - Callback: PragmaDirective |
80 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:16:1" |
81 | // CHECK-NEXT: Introducer: PIK_HashPragma |
82 | // CHECK-NEXT: - Callback: PragmaWarningPop |
83 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:16:9" |
84 | // CHECK-NEXT: - Callback: PragmaDirective |
85 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:1" |
86 | // CHECK-NEXT: Introducer: PIK_HashPragma |
87 | // CHECK-NEXT: - Callback: PragmaWarning |
88 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:9" |
89 | // CHECK-NEXT: WarningSpec: PWS_Disable |
90 | // CHECK-NEXT: Ids: [1, 2, 3] |
91 | // CHECK-NEXT: - Callback: PragmaWarning |
92 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:9" |
93 | // CHECK-NEXT: WarningSpec: PWS_Error |
94 | // CHECK-NEXT: Ids: [4, 5, 6] |
95 | // CHECK-NEXT: - Callback: PragmaWarning |
96 | // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-pragma-ms.cpp:17:9" |
97 | // CHECK-NEXT: WarningSpec: PWS_Suppress |
98 | // CHECK-NEXT: Ids: [7, 8, 9] |
99 | // CHECK-NEXT: - Callback: EndOfMainFile |
100 | // CHECK-NEXT: ... |
101 | |