2 // RUN: split-file %s %t
3 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4 // RUN: %t/reference.output.json.in >> %t/reference.output.json
5 // RUN: %clang_cc1 -extract-api --pretty-sgf -triple arm64-apple-macosx \
6 // RUN: -x c++-header %t/input.h -o %t/output.json -verify
8 // Generator version is not consistent across test runs, normalize it.
9 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
10 // RUN: %t/output.json >> %t/output-normalized.json
11 // RUN: diff %t/reference.output.json %t/output-normalized.json
25 /// expected-no-diagnostics
27 //--- reference.output.json.in
40 "architecture": "arm64",
55 "source": "c:@S@Foo@FI@a",
57 "targetFallback": "Foo"
61 "source": "c:@S@Foo@FI@b",
63 "targetFallback": "Foo"
67 "source": "c:@S@Foo@FI@c",
69 "targetFallback": "Foo"
73 "source": "c:@S@Foo@FI@d",
75 "targetFallback": "Foo"
80 "accessLevel": "public",
81 "declarationFragments": [
100 "interfaceLanguage": "c++",
101 "precise": "c:@S@Foo"
104 "displayName": "Class",
105 "identifier": "c++.class"
112 "uri": "file://INPUT_DIR/input.h"
117 "kind": "identifier",
123 "kind": "identifier",
134 "accessLevel": "private",
135 "declarationFragments": [
137 "kind": "typeIdentifier",
138 "preciseIdentifier": "c:I",
146 "kind": "identifier",
155 "interfaceLanguage": "c++",
156 "precise": "c:@S@Foo@FI@a"
159 "displayName": "Instance Property",
160 "identifier": "c++.property"
167 "uri": "file://INPUT_DIR/input.h"
172 "kind": "identifier",
178 "kind": "identifier",
190 "accessLevel": "private",
191 "declarationFragments": [
194 "spelling": "mutable"
201 "kind": "typeIdentifier",
202 "preciseIdentifier": "c:I",
210 "kind": "identifier",
219 "interfaceLanguage": "c++",
220 "precise": "c:@S@Foo@FI@b"
223 "displayName": "Instance Property",
224 "identifier": "c++.property"
231 "uri": "file://INPUT_DIR/input.h"
236 "kind": "identifier",
242 "kind": "identifier",
254 "accessLevel": "protected",
255 "declarationFragments": [
257 "kind": "typeIdentifier",
258 "preciseIdentifier": "c:I",
266 "kind": "identifier",
275 "interfaceLanguage": "c++",
276 "precise": "c:@S@Foo@FI@c"
279 "displayName": "Instance Property",
280 "identifier": "c++.property"
287 "uri": "file://INPUT_DIR/input.h"
292 "kind": "identifier",
298 "kind": "identifier",
310 "accessLevel": "public",
311 "declarationFragments": [
313 "kind": "typeIdentifier",
314 "preciseIdentifier": "c:I",
322 "kind": "identifier",
331 "interfaceLanguage": "c++",
332 "precise": "c:@S@Foo@FI@d"
335 "displayName": "Instance Property",
336 "identifier": "c++.property"
343 "uri": "file://INPUT_DIR/input.h"
348 "kind": "identifier",
354 "kind": "identifier",