11// RUN: rm -rf %t
22// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
33// 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
59
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
916/// A global variable with an anonymous struct type.
1017struct { char * prefix ; char * content ; } global ;
1118// GLOBAL-LABEL: "!testLabel": "c:@global"
@@ -30,7 +37,7 @@ struct { char *prefix; char *content; } global;
3037// GLOBAL: "text": "A global variable with an anonymous struct type."
3138// GLOBAL: "kind": {
3239// GLOBAL-NEXT: "displayName": "Global Variable",
33- // GLOBAL-NEXT: "identifier": "c.var"
40+ // GLOBAL-NEXT: "identifier": "c{{(\+\+)?}} .var"
3441// GLOBAL: "title": "global"
3542// GLOBAL: "pathComponents": [
3643// GLOBAL-NEXT: "global"
@@ -54,9 +61,12 @@ struct { char *prefix; char *content; } global;
5461
5562/// A Vehicle
5663struct 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
6070 /// The type of vehicle.
6171 enum {
6272 Bicycle ,
@@ -96,9 +106,12 @@ struct Vehicle {
96106 // CAR-NEXT: "Car"
97107 // CAR-NEXT: ]
98108
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
102115 /// The information about the vehicle.
103116 union {
104117 int wheels ;
@@ -145,8 +158,10 @@ struct Vehicle {
145158 // NAME-NEXT: ]
146159};
147160
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
150165enum {
151166 GlobalCase ,
152167 GlobalOtherCase
@@ -163,7 +178,8 @@ enum {
163178// GLOBALOTHERCASE-NEXT: "GlobalOtherCase"
164179// GLOBALOTHERCASE-NEXT: ]
165180
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
167183union Vector {
168184 struct {
169185 float X ;
0 commit comments