[LV] Add test showing debug output for loops with uncountable BTCs.
[llvm-project.git] / clang / test / ExtractAPI / typedef.c
bloba4c3619bfd210ad71b947b25e5619fa38780ba5c
1 // RUN: rm -rf %t
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
6 typedef int MyInt;
7 // MYINT-LABEL: "!testLabel": "c:typedef.c@T@MyInt"
8 // MYINT: "accessLevel": "public",
9 // MYINT: "declarationFragments": [
10 // MYINT-NEXT: {
11 // MYINT-NEXT: "kind": "keyword",
12 // MYINT-NEXT: "spelling": "typedef"
13 // MYINT-NEXT: },
14 // MYINT-NEXT: {
15 // MYINT-NEXT: "kind": "text",
16 // MYINT-NEXT: "spelling": " "
17 // MYINT-NEXT: },
18 // MYINT-NEXT: {
19 // MYINT-NEXT: "kind": "typeIdentifier",
20 // MYINT-NEXT: "preciseIdentifier": "c:I",
21 // MYINT-NEXT: "spelling": "int"
22 // MYINT-NEXT: },
23 // MYINT-NEXT: {
24 // MYINT-NEXT: "kind": "text",
25 // MYINT-NEXT: "spelling": " "
26 // MYINT-NEXT: },
27 // MYINT-NEXT: {
28 // MYINT-NEXT: "kind": "identifier",
29 // MYINT-NEXT: "spelling": "MyInt"
30 // MYINT-NEXT: },
31 // MYINT-NEXT: {
32 // MYINT-NEXT: "kind": "text",
33 // MYINT-NEXT: "spelling": ";"
34 // MYINT-NEXT: }
35 // MYINT-NEXT: ],
36 // MYINT: "kind": {
37 // MYINT-NEXT: "displayName": "Type Alias",
38 // MYINT-NEXT: "identifier": "objective-c.typealias"
39 // MYINT-NEXT: },
40 // MYINT: "title": "MyInt"
41 // MYINT: "pathComponents": [
42 // MYINT-NEXT: "MyInt"
43 // MYINT-NEXT: ],
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": [
51 // BARPTR-NEXT: {
52 // BARPTR-NEXT: "kind": "keyword",
53 // BARPTR-NEXT: "spelling": "typedef"
54 // BARPTR-NEXT: },
55 // BARPTR-NEXT: {
56 // BARPTR-NEXT: "kind": "text",
57 // BARPTR-NEXT: "spelling": " "
58 // BARPTR-NEXT: },
59 // BARPTR-NEXT: {
60 // BARPTR-NEXT: "kind": "keyword",
61 // BARPTR-NEXT: "spelling": "struct"
62 // BARPTR-NEXT: },
63 // BARPTR-NEXT: {
64 // BARPTR-NEXT: "kind": "text",
65 // BARPTR-NEXT: "spelling": " "
66 // BARPTR-NEXT: },
67 // BARPTR-NEXT: {
68 // BARPTR-NEXT: "kind": "typeIdentifier",
69 // BARPTR-NEXT: "preciseIdentifier": "c:@S@Bar",
70 // BARPTR-NEXT: "spelling": "Bar"
71 // BARPTR-NEXT: },
72 // BARPTR-NEXT: {
73 // BARPTR-NEXT: "kind": "text",
74 // BARPTR-NEXT: "spelling": " * "
75 // BARPTR-NEXT: },
76 // BARPTR-NEXT: {
77 // BARPTR-NEXT: "kind": "identifier",
78 // BARPTR-NEXT: "spelling": "BarPtr"
79 // BARPTR-NEXT: },
80 // BARPTR-NEXT: {
81 // BARPTR-NEXT: "kind": "text",
82 // BARPTR-NEXT: "spelling": ";"
83 // BARPTR-NEXT: }
84 // BARPTR-NEXT: ],
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