1
1
// RUN: rm -rf %t
2
2
// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
3
3
// RUN: -triple arm64-apple-macosx -isystem %S -fretain-comments-from-system-headers \
4
- // RUN: -x c-header %s -o %t/output.symbols.json -verify
4
+ // RUN: -x c-header %s -o %t/output-c.symbols.json -verify
5
+ //
6
+ // RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
7
+ // RUN: -triple arm64-apple-macosx -isystem %S -fretain-comments-from-system-headers \
8
+ // RUN: -x c++-header %s -o %t/output-cxx.symbols.json -verify
5
9
6
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix GLOBAL
7
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix PREFIX
8
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix CONTENT
10
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix GLOBAL
11
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix PREFIX
12
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix CONTENT
13
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix GLOBAL
14
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix PREFIX
15
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix CONTENT
9
16
/// A global variable with an anonymous struct type.
10
17
struct { char * prefix ; char * content ; } global ;
11
18
// GLOBAL-LABEL: "!testLabel": "c:@global"
@@ -30,7 +37,7 @@ struct { char *prefix; char *content; } global;
30
37
// GLOBAL: "text": "A global variable with an anonymous struct type."
31
38
// GLOBAL: "kind": {
32
39
// GLOBAL-NEXT: "displayName": "Global Variable",
33
- // GLOBAL-NEXT: "identifier": "c.var"
40
+ // GLOBAL-NEXT: "identifier": "c{{(\+\+)?}} .var"
34
41
// GLOBAL: "title": "global"
35
42
// GLOBAL: "pathComponents": [
36
43
// GLOBAL-NEXT: "global"
@@ -54,9 +61,12 @@ struct { char *prefix; char *content; } global;
54
61
55
62
/// A Vehicle
56
63
struct Vehicle {
57
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix TYPE
58
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix BICYCLE
59
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix CAR
64
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix TYPE
65
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix BICYCLE
66
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix CAR
67
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix TYPE
68
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix BICYCLE
69
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix CAR
60
70
/// The type of vehicle.
61
71
enum {
62
72
Bicycle ,
@@ -96,9 +106,12 @@ struct Vehicle {
96
106
// CAR-NEXT: "Car"
97
107
// CAR-NEXT: ]
98
108
99
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix INFORMATION
100
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix WHEELS
101
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix NAME
109
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix INFORMATION
110
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix WHEELS
111
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix NAME
112
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix INFORMATION
113
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix WHEELS
114
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix NAME
102
115
/// The information about the vehicle.
103
116
union {
104
117
int wheels ;
@@ -145,8 +158,10 @@ struct Vehicle {
145
158
// NAME-NEXT: ]
146
159
};
147
160
148
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix GLOBALCASE
149
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix GLOBALOTHERCASE
161
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix GLOBALCASE
162
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix GLOBALOTHERCASE
163
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix GLOBALCASE
164
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix GLOBALOTHERCASE
150
165
enum {
151
166
GlobalCase ,
152
167
GlobalOtherCase
@@ -163,7 +178,8 @@ enum {
163
178
// GLOBALOTHERCASE-NEXT: "GlobalOtherCase"
164
179
// GLOBALOTHERCASE-NEXT: ]
165
180
166
- // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix VEC
181
+ // RUN: FileCheck %s --input-file %t/output-c.symbols.json --check-prefix VEC
182
+ // RUN: FileCheck %s --input-file %t/output-cxx.symbols.json --check-prefix VEC
167
183
union Vector {
168
184
struct {
169
185
float X ;
0 commit comments