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 --product-name=TypedefChain -target arm64-apple-macosx \
6 // RUN: -x objective-c-header %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:
18 typedef MyInt MyIntInt
;
19 typedef MyIntInt MyIntIntInt
;
21 //--- reference.output.json.in
32 "name": "TypedefChain",
34 "architecture": "arm64",
49 "accessLevel": "public",
50 "declarationFragments": [
60 "kind": "typeIdentifier",
61 "preciseIdentifier": "c:I",
78 "interfaceLanguage": "objective-c",
79 "precise": "c:input.h@T@MyInt"
82 "displayName": "Type Alias",
83 "identifier": "objective-c.typealias"
90 "uri": "file://INPUT_DIR/input.h"
101 "kind": "identifier",
113 "accessLevel": "public",
114 "declarationFragments": [
117 "spelling": "typedef"
124 "kind": "typeIdentifier",
125 "preciseIdentifier": "c:input.h@T@MyInt",
133 "kind": "identifier",
134 "spelling": "MyIntInt"
142 "interfaceLanguage": "objective-c",
143 "precise": "c:input.h@T@MyIntInt"
146 "displayName": "Type Alias",
147 "identifier": "objective-c.typealias"
154 "uri": "file://INPUT_DIR/input.h"
159 "kind": "identifier",
160 "spelling": "MyIntInt"
165 "kind": "identifier",
166 "spelling": "MyIntInt"
174 "type": "c:input.h@T@MyInt"
177 "accessLevel": "public",
178 "declarationFragments": [
181 "spelling": "typedef"
188 "kind": "typeIdentifier",
189 "preciseIdentifier": "c:input.h@T@MyIntInt",
190 "spelling": "MyIntInt"
197 "kind": "identifier",
198 "spelling": "MyIntIntInt"
206 "interfaceLanguage": "objective-c",
207 "precise": "c:input.h@T@MyIntIntInt"
210 "displayName": "Type Alias",
211 "identifier": "objective-c.typealias"
218 "uri": "file://INPUT_DIR/input.h"
223 "kind": "identifier",
224 "spelling": "MyIntIntInt"
229 "kind": "identifier",
230 "spelling": "MyIntIntInt"
233 "title": "MyIntIntInt"
238 "type": "c:input.h@T@MyIntInt"