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