[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / ExtractAPI / typedef_chain.c
blobff838978d492ab51a57038f9f49bb9840bf8a988
1 // RUN: rm -rf %t
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 --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
13 // CHECK-NOT: error:
14 // CHECK-NOT: warning:
16 //--- input.h
17 typedef int MyInt;
18 typedef MyInt MyIntInt;
19 typedef MyIntInt MyIntIntInt;
21 //--- reference.output.json.in
23 "metadata": {
24 "formatVersion": {
25 "major": 0,
26 "minor": 5,
27 "patch": 3
29 "generator": "?"
31 "module": {
32 "name": "TypedefChain",
33 "platform": {
34 "architecture": "arm64",
35 "operatingSystem": {
36 "minimumVersion": {
37 "major": 11,
38 "minor": 0,
39 "patch": 0
41 "name": "macosx"
43 "vendor": "apple"
46 "relationships": [],
47 "symbols": [
49 "accessLevel": "public",
50 "declarationFragments": [
52 "kind": "keyword",
53 "spelling": "typedef"
56 "kind": "text",
57 "spelling": " "
60 "kind": "typeIdentifier",
61 "preciseIdentifier": "c:I",
62 "spelling": "int"
65 "kind": "text",
66 "spelling": " "
69 "kind": "identifier",
70 "spelling": "MyInt"
73 "kind": "text",
74 "spelling": ";"
77 "identifier": {
78 "interfaceLanguage": "objective-c",
79 "precise": "c:input.h@T@MyInt"
81 "kind": {
82 "displayName": "Type Alias",
83 "identifier": "objective-c.typealias"
85 "location": {
86 "position": {
87 "character": 13,
88 "line": 1
90 "uri": "file://INPUT_DIR/input.h"
92 "names": {
93 "navigator": [
95 "kind": "identifier",
96 "spelling": "MyInt"
99 "subHeading": [
101 "kind": "identifier",
102 "spelling": "MyInt"
105 "title": "MyInt"
107 "pathComponents": [
108 "MyInt"
110 "type": "c:I"
113 "accessLevel": "public",
114 "declarationFragments": [
116 "kind": "keyword",
117 "spelling": "typedef"
120 "kind": "text",
121 "spelling": " "
124 "kind": "typeIdentifier",
125 "preciseIdentifier": "c:input.h@T@MyInt",
126 "spelling": "MyInt"
129 "kind": "text",
130 "spelling": " "
133 "kind": "identifier",
134 "spelling": "MyIntInt"
137 "kind": "text",
138 "spelling": ";"
141 "identifier": {
142 "interfaceLanguage": "objective-c",
143 "precise": "c:input.h@T@MyIntInt"
145 "kind": {
146 "displayName": "Type Alias",
147 "identifier": "objective-c.typealias"
149 "location": {
150 "position": {
151 "character": 15,
152 "line": 2
154 "uri": "file://INPUT_DIR/input.h"
156 "names": {
157 "navigator": [
159 "kind": "identifier",
160 "spelling": "MyIntInt"
163 "subHeading": [
165 "kind": "identifier",
166 "spelling": "MyIntInt"
169 "title": "MyIntInt"
171 "pathComponents": [
172 "MyIntInt"
174 "type": "c:input.h@T@MyInt"
177 "accessLevel": "public",
178 "declarationFragments": [
180 "kind": "keyword",
181 "spelling": "typedef"
184 "kind": "text",
185 "spelling": " "
188 "kind": "typeIdentifier",
189 "preciseIdentifier": "c:input.h@T@MyIntInt",
190 "spelling": "MyIntInt"
193 "kind": "text",
194 "spelling": " "
197 "kind": "identifier",
198 "spelling": "MyIntIntInt"
201 "kind": "text",
202 "spelling": ";"
205 "identifier": {
206 "interfaceLanguage": "objective-c",
207 "precise": "c:input.h@T@MyIntIntInt"
209 "kind": {
210 "displayName": "Type Alias",
211 "identifier": "objective-c.typealias"
213 "location": {
214 "position": {
215 "character": 18,
216 "line": 3
218 "uri": "file://INPUT_DIR/input.h"
220 "names": {
221 "navigator": [
223 "kind": "identifier",
224 "spelling": "MyIntIntInt"
227 "subHeading": [
229 "kind": "identifier",
230 "spelling": "MyIntIntInt"
233 "title": "MyIntIntInt"
235 "pathComponents": [
236 "MyIntIntInt"
238 "type": "c:input.h@T@MyIntInt"