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 -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
18 /// expected-no-diagnostics
20 //--- reference.output.json.in
33 "architecture": "arm64",
48 "source": "c:@S@Foo@F@Foo#",
50 "targetFallback": "Foo"
54 "source": "c:@S@Foo@F@~Foo#",
56 "targetFallback": "Foo"
61 "accessLevel": "public",
62 "declarationFragments": [
81 "interfaceLanguage": "c++",
85 "displayName": "Class",
86 "identifier": "c++.class"
93 "uri": "file://INPUT_DIR/input.h"
104 "kind": "identifier",
115 "accessLevel": "private",
116 "declarationFragments": [
118 "kind": "identifier",
126 "functionSignature": {
129 "kind": "typeIdentifier",
130 "preciseIdentifier": "c:v",
136 "interfaceLanguage": "c++",
137 "precise": "c:@S@Foo@F@Foo#"
140 "displayName": "Instance Method",
141 "identifier": "c++.method"
148 "uri": "file://INPUT_DIR/input.h"
153 "kind": "identifier",
159 "kind": "identifier",
171 "accessLevel": "private",
172 "declarationFragments": [
174 "kind": "identifier",
182 "functionSignature": {
185 "kind": "typeIdentifier",
186 "preciseIdentifier": "c:v",
192 "interfaceLanguage": "c++",
193 "precise": "c:@S@Foo@F@~Foo#"
196 "displayName": "Instance Method",
197 "identifier": "c++.method"
204 "uri": "file://INPUT_DIR/input.h"
209 "kind": "identifier",
215 "kind": "identifier",