2 // RUN: split-file %s %t
3 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4 // RUN: %t/c.reference.output.json.in >> %t/c.reference.output.json
5 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
6 // RUN: %t/objc.reference.output.json.in >> %t/objc.reference.output.json
8 // RUN: %clang -extract-api -x c-header -target arm64-apple-macosx \
9 // RUN: %t/c.h -o %t/c.output.json | FileCheck -allow-empty %s
10 // RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \
11 // RUN: %t/objc.h -o %t/objc.output.json | FileCheck -allow-empty %s
13 // Generator version is not consistent across test runs, normalize it.
14 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
15 // RUN: %t/c.output.json >> %t/c.output-normalized.json
16 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
17 // RUN: %t/objc.output.json >> %t/objc.output-normalized.json
19 // RUN: diff %t/c.reference.output.json %t/c.output-normalized.json
20 // RUN: diff %t/objc.reference.output.json %t/objc.output-normalized.json
23 // CHECK-NOT: warning:
31 //--- c.reference.output.json.in
44 "architecture": "arm64",
59 "accessLevel": "public",
60 "declarationFragments": [
62 "kind": "typeIdentifier",
63 "preciseIdentifier": "c:C",
76 "interfaceLanguage": "c",
80 "displayName": "Global Variable",
88 "uri": "file://INPUT_DIR/c.h"
111 //--- objc.reference.output.json.in
124 "architecture": "arm64",
139 "accessLevel": "public",
140 "declarationFragments": [
142 "kind": "typeIdentifier",
143 "preciseIdentifier": "c:C",
151 "kind": "identifier",
156 "interfaceLanguage": "objective-c",
160 "displayName": "Global Variable",
161 "identifier": "objective-c.var"
168 "uri": "file://INPUT_DIR/objc.h"
173 "kind": "identifier",
179 "kind": "identifier",