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 -extract-api -target arm64-apple-macosx \
6 // RUN: %t/input.h -o %t/output.json
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 "accessLevel": "public",
49 "declarationFragments": [
51 "kind": "typeIdentifier",
52 "preciseIdentifier": "c:b",
69 "interfaceLanguage": "c",
73 "displayName": "Global Variable",
81 "uri": "file://INPUT_DIR/input.h"
103 "accessLevel": "public",
104 "declarationFragments": [
106 "kind": "typeIdentifier",
107 "preciseIdentifier": "c:b",
115 "kind": "identifier",
123 "kind": "typeIdentifier",
124 "preciseIdentifier": "c:b",
132 "kind": "internalParam",
140 "functionSignature": {
143 "declarationFragments": [
145 "kind": "typeIdentifier",
146 "preciseIdentifier": "c:b",
154 "kind": "internalParam",
163 "kind": "typeIdentifier",
164 "preciseIdentifier": "c:b",
170 "interfaceLanguage": "c",
171 "precise": "c:@F@IsFoo"
174 "displayName": "Function",
175 "identifier": "c.func"
182 "uri": "file://INPUT_DIR/input.h"
187 "kind": "identifier",
193 "kind": "identifier",