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
17 /// expected-no-diagnostics
19 //--- reference.output.json.in
32 "architecture": "arm64",
47 "source": "c:@S@Foo@F@operator+#I#",
49 "targetFallback": "Foo"
54 "accessLevel": "public",
55 "declarationFragments": [
74 "interfaceLanguage": "c++",
78 "displayName": "Class",
79 "identifier": "c++.class"
86 "uri": "file://INPUT_DIR/input.h"
108 "accessLevel": "private",
109 "declarationFragments": [
111 "kind": "typeIdentifier",
112 "preciseIdentifier": "c:I",
120 "kind": "identifier",
121 "spelling": "operator+"
128 "kind": "typeIdentifier",
129 "preciseIdentifier": "c:I",
137 "kind": "internalParam",
145 "functionSignature": {
148 "declarationFragments": [
150 "kind": "typeIdentifier",
151 "preciseIdentifier": "c:I",
159 "kind": "internalParam",
168 "kind": "typeIdentifier",
169 "preciseIdentifier": "c:I",
175 "interfaceLanguage": "c++",
176 "precise": "c:@S@Foo@F@operator+#I#"
179 "displayName": "Instance Method",
180 "identifier": "c++.method"
187 "uri": "file://INPUT_DIR/input.h"
192 "kind": "identifier",
193 "spelling": "operator+"
198 "kind": "identifier",
199 "spelling": "operator+"