[Flang][Parser] Add missing #include "flang/Common/idioms.h" (#77484)
[llvm-project.git] / clang-tools-extra / test / pp-trace / pp-trace-include.cpp
blobdb0b2c89430a21cc9af48fc7a64c791744ec4878
1 // RUN: pp-trace %s -- -undef -target x86_64 -std=c++11 | FileCheck --strict-whitespace %s
3 #include "Inputs/Level1A.h"
4 #include "Inputs/Level1B.h"
6 // CHECK: ---
7 // CHECK-NEXT: - Callback: FileChanged
8 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:1:1"
9 // CHECK-NEXT: Reason: EnterFile
10 // CHECK-NEXT: FileType: C_User
11 // CHECK-NEXT: PrevFID: (invalid)
12 // CHECK-NEXT: - Callback: FileChanged
13 // CHECK-NEXT: Loc: "<built-in>:1:1"
14 // CHECK-NEXT: Reason: EnterFile
15 // CHECK-NEXT: FileType: C_User
16 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}pp-trace-include.cpp"
17 // CHECK-NEXT: - Callback: FileChanged
18 // CHECK-NEXT: Loc: "<built-in>:1:1"
19 // CHECK-NEXT: Reason: RenameFile
20 // CHECK-NEXT: FileType: C_System
21 // CHECK-NEXT: PrevFID: (invalid)
22 // CHECK-NEXT: - Callback: MacroDefined
23 // CHECK: MacroNameTok: __STDC__
24 // CHECK-NEXT: MacroDirective: MD_Define
25 // CHECK-NEXT: - Callback: MacroDefined
26 // CHECK: MacroNameTok: __STDC_HOSTED__
27 // CHECK-NEXT: MacroDirective: MD_Define
28 // CHECK-NEXT: - Callback: MacroDefined
29 // CHECK: MacroNameTok: __cplusplus
30 // CHECK-NEXT: MacroDirective: MD_Define
31 // CHECK-NEXT: - Callback: MacroDefined
32 // CHECK: MacroNameTok: __STDC_UTF_16__
33 // CHECK-NEXT: MacroDirective: MD_Define
34 // CHECK-NEXT: - Callback: MacroDefined
35 // CHECK: MacroNameTok: __STDC_UTF_32__
36 // CHECK-NEXT: MacroDirective: MD_Define
37 // CHECK: - Callback: FileChanged
38 // CHECK-NEXT: Loc: "<command line>:1:1"
39 // CHECK-NEXT: Reason: EnterFile
40 // CHECK-NEXT: FileType: C_User
41 // CHECK-NEXT: PrevFID: (invalid)
42 // CHECK: - Callback: MacroDefined
43 // CHECK: - Callback: FileChanged
44 // CHECK-NEXT: Loc: "<built-in>:1:1"
45 // CHECK-NEXT: Reason: ExitFile
46 // CHECK-NEXT: FileType: C_User
47 // CHECK-NEXT: PrevFID: (invalid)
48 // CHECK-NEXT: - Callback: FileChanged
49 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:1:1"
50 // CHECK-NEXT: Reason: ExitFile
51 // CHECK-NEXT: FileType: C_User
52 // CHECK-NEXT: PrevFID: (getFileEntryForID failed)
53 // CHECK-NEXT: - Callback: InclusionDirective
54 // CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:3:1"
55 // CHECK-NEXT: IncludeTok: include
56 // CHECK-NEXT: FileName: "Inputs/Level1A.h"
57 // CHECK-NEXT: IsAngled: false
58 // CHECK-NEXT: FilenameRange: "Inputs/Level1A.h"
59 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level1A.h"
60 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}pp-trace"
61 // CHECK-NEXT: RelativePath: "Inputs/Level1A.h"
62 // CHECK-NEXT: Imported: (null)
63 // CHECK-NEXT: - Callback: FileChanged
64 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1A.h:1:1"
65 // CHECK-NEXT: Reason: EnterFile
66 // CHECK-NEXT: FileType: C_User
67 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}pp-trace-include.cpp"
68 // CHECK-NEXT: - Callback: InclusionDirective
69 // CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}Inputs/Level1A.h:1:1"
70 // CHECK-NEXT: IncludeTok: include
71 // CHECK-NEXT: FileName: "Level2A.h"
72 // CHECK-NEXT: IsAngled: false
73 // CHECK-NEXT: FilenameRange: "Level2A.h"
74 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level2A.h"
75 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}Inputs"
76 // CHECK-NEXT: RelativePath: "Level2A.h"
77 // CHECK-NEXT: Imported: (null)
78 // CHECK-NEXT: - Callback: FileChanged
79 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level2A.h:1:1"
80 // CHECK-NEXT: Reason: EnterFile
81 // CHECK-NEXT: FileType: C_User
82 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1A.h"
83 // CHECK-NEXT: - Callback: MacroDefined
84 // CHECK-NEXT: MacroNameTok: MACRO_2A
85 // CHECK-NEXT: MacroDirective: MD_Define
86 // CHECK-NEXT: - Callback: FileChanged
87 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1A.h:2:1"
88 // CHECK-NEXT: Reason: ExitFile
89 // CHECK-NEXT: FileType: C_User
90 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2A.h"
91 // CHECK-NEXT: - Callback: MacroDefined
92 // CHECK-NEXT: MacroNameTok: MACRO_1A
93 // CHECK-NEXT: MacroDirective: MD_Define
94 // CHECK-NEXT: - Callback: FileChanged
95 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:4:1"
96 // CHECK-NEXT: Reason: ExitFile
97 // CHECK-NEXT: FileType: C_User
98 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1A.h"
99 // CHECK-NEXT: - Callback: InclusionDirective
100 // CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:4:1"
101 // CHECK-NEXT: IncludeTok: include
102 // CHECK-NEXT: FileName: "Inputs/Level1B.h"
103 // CHECK-NEXT: IsAngled: false
104 // CHECK-NEXT: FilenameRange: "Inputs/Level1B.h"
105 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level1B.h"
106 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}pp-trace"
107 // CHECK-NEXT: RelativePath: "Inputs/Level1B.h"
108 // CHECK-NEXT: Imported: (null)
109 // CHECK-NEXT: - Callback: FileChanged
110 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:1:1"
111 // CHECK-NEXT: Reason: EnterFile
112 // CHECK-NEXT: FileType: C_User
113 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}pp-trace-include.cpp"
114 // CHECK-NEXT: - Callback: InclusionDirective
115 // CHECK-NEXT: HashLoc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:1:1"
116 // CHECK-NEXT: IncludeTok: include
117 // CHECK-NEXT: FileName: "Level2B.h"
118 // CHECK-NEXT: IsAngled: false
119 // CHECK-NEXT: FilenameRange: "Level2B.h"
120 // CHECK-NEXT: File: "{{.*}}{{[/\\]}}Inputs/Level2B.h"
121 // CHECK-NEXT: SearchPath: "{{.*}}{{[/\\]}}Inputs"
122 // CHECK-NEXT: RelativePath: "Level2B.h"
123 // CHECK-NEXT: Imported: (null)
124 // CHECK-NEXT: - Callback: FileChanged
125 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level2B.h:1:1"
126 // CHECK-NEXT: Reason: EnterFile
127 // CHECK-NEXT: FileType: C_User
128 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1B.h"
129 // CHECK-NEXT: - Callback: MacroDefined
130 // CHECK-NEXT: MacroNameTok: MACRO_2B
131 // CHECK-NEXT: MacroDirective: MD_Define
132 // CHECK-NEXT: - Callback: FileChanged
133 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}Inputs/Level1B.h:2:1"
134 // CHECK-NEXT: Reason: ExitFile
135 // CHECK-NEXT: FileType: C_User
136 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level2B.h"
137 // CHECK-NEXT: - Callback: MacroDefined
138 // CHECK-NEXT: MacroNameTok: MACRO_1B
139 // CHECK-NEXT: MacroDirective: MD_Define
140 // CHECK-NEXT: - Callback: FileChanged
141 // CHECK-NEXT: Loc: "{{.*}}{{[/\\]}}pp-trace-include.cpp:5:1"
142 // CHECK-NEXT: Reason: ExitFile
143 // CHECK-NEXT: FileType: C_User
144 // CHECK-NEXT: PrevFID: "{{.*}}{{[/\\]}}Inputs/Level1B.h"
145 // CHECK-NEXT: - Callback: EndOfMainFile
146 // CHECK-NEXT: ...