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 --pretty-sgf -triple arm64-apple-macosx -x objective-c-header %t/input.h -o %t/output.json -verify
7 // Generator version is not consistent across test runs, normalize it.
8 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
9 // RUN: %t/output.json >> %t/output-normalized.json
10 // RUN: diff %t/reference.output.json %t/output-normalized.json
15 - (instancetype) init;
18 // expected-no-diagnostics
21 //--- reference.output.json.in
34 "architecture": "arm64",
49 "source": "c:objc(cs)Foo(im)init",
50 "target": "c:objc(cs)Foo",
51 "targetFallback": "Foo"
55 "source": "c:objc(cs)Foo(im)reset",
56 "target": "c:objc(cs)Foo",
57 "targetFallback": "Foo"
62 "accessLevel": "public",
63 "declarationFragments": [
66 "spelling": "@interface"
78 "interfaceLanguage": "objective-c",
79 "precise": "c:objc(cs)Foo"
82 "displayName": "Class",
83 "identifier": "objective-c.class"
90 "uri": "file://INPUT_DIR/input.h"
101 "kind": "identifier",
112 "accessLevel": "public",
113 "declarationFragments": [
120 "spelling": "instancetype"
127 "kind": "identifier",
135 "functionSignature": {
139 "spelling": "instancetype"
144 "interfaceLanguage": "objective-c",
145 "precise": "c:objc(cs)Foo(im)init"
148 "displayName": "Instance Method",
149 "identifier": "objective-c.method"
156 "uri": "file://INPUT_DIR/input.h"
161 "kind": "identifier",
171 "kind": "identifier",
183 "accessLevel": "public",
184 "declarationFragments": [
198 "kind": "identifier",
206 "functionSignature": {
215 "interfaceLanguage": "objective-c",
216 "precise": "c:objc(cs)Foo(im)reset"
219 "displayName": "Instance Method",
220 "identifier": "objective-c.method"
227 "uri": "file://INPUT_DIR/input.h"
232 "kind": "identifier",
242 "kind": "identifier",