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