2 // RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing \
3 // RUN: -triple arm64-apple-macosx -x objective-c-header %s -o %t/output.symbols.json -verify
5 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix MYINT
7 // MYINT-LABEL: "!testLabel": "c:typedef.c@T@MyInt"
8 // MYINT: "accessLevel": "public",
9 // MYINT: "declarationFragments": [
11 // MYINT-NEXT: "kind": "keyword",
12 // MYINT-NEXT: "spelling": "typedef"
15 // MYINT-NEXT: "kind": "text",
16 // MYINT-NEXT: "spelling": " "
19 // MYINT-NEXT: "kind": "typeIdentifier",
20 // MYINT-NEXT: "preciseIdentifier": "c:I",
21 // MYINT-NEXT: "spelling": "int"
24 // MYINT-NEXT: "kind": "text",
25 // MYINT-NEXT: "spelling": " "
28 // MYINT-NEXT: "kind": "identifier",
29 // MYINT-NEXT: "spelling": "MyInt"
32 // MYINT-NEXT: "kind": "text",
33 // MYINT-NEXT: "spelling": ";"
37 // MYINT-NEXT: "displayName": "Type Alias",
38 // MYINT-NEXT: "identifier": "objective-c.typealias"
40 // MYINT: "title": "MyInt"
41 // MYINT: "pathComponents": [
42 // MYINT-NEXT: "MyInt"
44 // MYINT: "type": "c:I"
46 // RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix BARPTR
47 typedef struct Bar
*BarPtr
;
48 // BARPTR-LABEL: "!testLabel": "c:typedef.c@T@BarPtr"
49 // BARPTR: "accessLevel": "public",
50 // BARPTR: "declarationFragments": [
52 // BARPTR-NEXT: "kind": "keyword",
53 // BARPTR-NEXT: "spelling": "typedef"
56 // BARPTR-NEXT: "kind": "text",
57 // BARPTR-NEXT: "spelling": " "
60 // BARPTR-NEXT: "kind": "keyword",
61 // BARPTR-NEXT: "spelling": "struct"
64 // BARPTR-NEXT: "kind": "text",
65 // BARPTR-NEXT: "spelling": " "
68 // BARPTR-NEXT: "kind": "typeIdentifier",
69 // BARPTR-NEXT: "preciseIdentifier": "c:@S@Bar",
70 // BARPTR-NEXT: "spelling": "Bar"
73 // BARPTR-NEXT: "kind": "text",
74 // BARPTR-NEXT: "spelling": " * "
77 // BARPTR-NEXT: "kind": "identifier",
78 // BARPTR-NEXT: "spelling": "BarPtr"
81 // BARPTR-NEXT: "kind": "text",
82 // BARPTR-NEXT: "spelling": ";"
85 // BARPTR: "type": "c:*$@S@Bar"
87 // RUN: FileCheck %s --input-file %t/output.symbols.json
88 void foo(BarPtr value
);
90 void baz(BarPtr
*value
);
91 // CHECK-NOT: struct Bar *
93 // expected-no-diagnostics