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 --pretty-sgf -x objective-c-header -target arm64-apple-macosx \
6 // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
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
14 // CHECK-NOT: warning:
20 @protocol AnotherProtocol <Protocol>
23 //--- reference.output.json.in
36 "architecture": "arm64",
51 "source": "c:objc(pl)AnotherProtocol",
52 "target": "c:objc(pl)Protocol",
53 "targetFallback": "Protocol"
58 "accessLevel": "public",
59 "declarationFragments": [
62 "spelling": "@protocol"
70 "spelling": "Protocol"
74 "interfaceLanguage": "objective-c",
75 "precise": "c:objc(pl)Protocol"
78 "displayName": "Protocol",
79 "identifier": "objective-c.protocol"
86 "uri": "file://INPUT_DIR/input.h"
92 "spelling": "Protocol"
98 "spelling": "Protocol"
108 "accessLevel": "public",
109 "declarationFragments": [
112 "spelling": "@protocol"
119 "kind": "identifier",
120 "spelling": "AnotherProtocol"
127 "kind": "typeIdentifier",
128 "preciseIdentifier": "c:objc(pl)Protocol",
129 "spelling": "Protocol"
137 "interfaceLanguage": "objective-c",
138 "precise": "c:objc(pl)AnotherProtocol"
141 "displayName": "Protocol",
142 "identifier": "objective-c.protocol"
149 "uri": "file://INPUT_DIR/input.h"
154 "kind": "identifier",
155 "spelling": "AnotherProtocol"
160 "kind": "identifier",
161 "spelling": "AnotherProtocol"
164 "title": "AnotherProtocol"