3 typedef struct t TYPEDEF
;
7 // RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -code-completion-patterns -code-completion-at=%s:6:14 -std=gnu++98 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
8 // CHECK-CC1: COMPLETION: bool
9 // CHECK-CC1-NEXT: COMPLETION: char
10 // CHECK-CC1-NEXT: COMPLETION: class
11 // CHECK-CC1-NEXT: COMPLETION: const
12 // CHECK-CC1-NEXT: COMPLETION: Pattern : const_cast<<#type#>>(<#expression#>)
13 // CHECK-CC1: COMPLETION: Pattern : [#void#]delete <#expression#>
14 // CHECK-CC1-NEXT: COMPLETION: Pattern : [#void#]delete [] <#expression#>
15 // CHECK-CC1-NEXT: COMPLETION: Pattern : do {
16 // CHECK-CC1-NEXT: <#statements#>
18 // CHECK-CC1: COMPLETION: double
19 // CHECK-CC1-NEXT: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
20 // CHECK-CC1-NEXT: COMPLETION: enum
21 // CHECK-CC1-NEXT: COMPLETION: extern
22 // CHECK-CC1-NEXT: COMPLETION: Pattern : [#bool#]false
23 // CHECK-CC1-NEXT: COMPLETION: float
24 // CHECK-CC1-NEXT: COMPLETION: foo : [#void#]foo()
25 // CHECK-CC1-NEXT: COMPLETION: Pattern : for (<#init-statement#>; <#condition#>; <#inc-expression#>) {
26 // CHECK-CC1-NEXT: <#statements#>{{$}}
28 // CHECK-CC1: COMPLETION: Pattern : goto <#label#>;
29 // CHECK-CC1-NEXT: COMPLETION: Pattern : if (<#condition#>) {
30 // CHECK-CC1-NEXT: <#statements#>{{$}}
32 // CHECK-CC1: COMPLETION: int
33 // CHECK-CC1-NEXT: COMPLETION: long
34 // CHECK-CC1-NEXT: COMPLETION: Pattern : new <#type#>(<#expressions#>)
35 // CHECK-CC1-NEXT: COMPLETION: Pattern : new <#type#>[<#size#>](<#expressions#>)
36 // CHECK-CC1-NEXT: COMPLETION: operator
37 // CHECK-CC1-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type#>>(<#expression#>)
38 // CHECK-CC1-NEXT: COMPLETION: Pattern : return;
39 // CHECK-CC1-NEXT: COMPLETION: short
40 // CHECK-CC1-NEXT: COMPLETION: signed
41 // CHECK-CC1-NEXT: COMPLETION: Pattern : [#size_t#]sizeof(<#expression-or-type#>)
42 // CHECK-CC1-NEXT: COMPLETION: static
43 // CHECK-CC1-NEXT: COMPLETION: Pattern : static_cast<<#type#>>(<#expression#>)
44 // CHECK-CC1-NEXT: COMPLETION: struct
45 // CHECK-CC1-NEXT: COMPLETION: Pattern : switch (<#condition#>) {
46 // CHECK-CC1: COMPLETION: t : t
47 // CHECK-CC1-NEXT: COMPLETION: Pattern : [#void#]throw <#expression#>
48 // CHECK-CC1-NEXT: COMPLETION: Pattern : [#bool#]true
49 // CHECK-CC1-NEXT: COMPLETION: Pattern : try {
50 // CHECK-CC1-NEXT: <#statements#>
51 // CHECK-CC1-NEXT: } catch (<#declaration#>) {
52 // CHECK-CC1-NEXT: <#statements#>
54 // CHECK-CC1: COMPLETION: TYPEDEF : TYPEDEF
55 // CHECK-CC1-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>;
56 // CHECK-CC1-NEXT: COMPLETION: Pattern : [#std::type_info#]typeid(<#expression-or-type#>)
57 // CHECK-CC1-NEXT: COMPLETION: Pattern : typename <#name#>
58 // CHECK-CC1-NEXT: COMPLETION: Pattern : typeof <#expression#>
59 // CHECK-CC1-NEXT: COMPLETION: Pattern : typeof(<#type#>)
60 // CHECK-CC1-NEXT: COMPLETION: union
61 // CHECK-CC1-NEXT: COMPLETION: unsigned
62 // CHECK-CC1-NOT: COMPLETION: Pattern : using <#name#> = <#type#>;
63 // CHECK-CC1-NEXT: COMPLETION: Pattern : using namespace <#identifier#>;
64 // CHECK-CC1-NEXT: COMPLETION: void
65 // CHECK-CC1-NEXT: COMPLETION: volatile
66 // CHECK-CC1-NEXT: COMPLETION: wchar_t
67 // CHECK-CC1-NEXT: COMPLETION: Pattern : while (<#condition#>) {
68 // CHECK-CC1-NEXT: <#statements#>
70 // CHECK-CC1: COMPLETION: X : X
71 // CHECK-CC1-NEXT: COMPLETION: y : [#int#]y
72 // CHECK-CC1-NEXT: COMPLETION: z : [#void#]z(<#int#>)
74 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:4:1 -std=gnu++98 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
75 // CHECK-CC2: COMPLETION: Pattern : asm(<#string-literal#>)
76 // CHECK-CC2-NEXT: COMPLETION: bool
77 // CHECK-CC2-NEXT: COMPLETION: char
78 // CHECK-CC2-NEXT: COMPLETION: class
79 // CHECK-CC2-NEXT: COMPLETION: const
80 // CHECK-CC2-NEXT: COMPLETION: double
81 // CHECK-CC2-NEXT: COMPLETION: enum
82 // CHECK-CC2-NEXT: COMPLETION: extern
83 // CHECK-CC2-NEXT: COMPLETION: float
84 // CHECK-CC2-NEXT: COMPLETION: inline
85 // CHECK-CC2-NEXT: COMPLETION: int
86 // CHECK-CC2-NEXT: COMPLETION: long
87 // CHECK-CC2-NEXT: COMPLETION: Pattern : namespace <#identifier#> {
88 // CHECK-CC2-NEXT: <#declarations#>
90 // CHECK-CC2: COMPLETION: Pattern : namespace <#name#> = <#namespace#>;
91 // CHECK-CC2-NEXT: COMPLETION: operator
92 // CHECK-CC2-NEXT: COMPLETION: short
93 // CHECK-CC2-NEXT: COMPLETION: signed
94 // CHECK-CC2-NEXT: COMPLETION: static
95 // CHECK-CC2-NEXT: COMPLETION: struct
96 // CHECK-CC2-NEXT: COMPLETION: t : t
97 // CHECK-CC2-NEXT: COMPLETION: Pattern : template <#declaration#>
98 // CHECK-CC2-NEXT: COMPLETION: Pattern : template<<#parameters#>>
99 // CHECK-CC2-NEXT: COMPLETION: TYPEDEF : TYPEDEF
100 // CHECK-CC2-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>;
101 // CHECK-CC2-NEXT: COMPLETION: Pattern : typename <#name#>
102 // CHECK-CC2-NEXT: COMPLETION: Pattern : typeof <#expression#>
103 // CHECK-CC2-NEXT: COMPLETION: Pattern : typeof(<#type#>)
104 // CHECK-CC2-NEXT: COMPLETION: union
105 // CHECK-CC2-NEXT: COMPLETION: unsigned
106 // CHECK-CC2-NEXT: COMPLETION: Pattern : using <#qualifier#>::<#name#>;
107 // CHECK-CC2-NOT: COMPLETION: Pattern : using <#name#> = <#type#>;
108 // CHECK-CC2-NEXT: COMPLETION: Pattern : using namespace <#identifier#>;
109 // CHECK-CC2-NEXT: COMPLETION: void
110 // CHECK-CC2-NEXT: COMPLETION: volatile
111 // CHECK-CC2-NEXT: COMPLETION: wchar_t
112 // CHECK-CC2-NEXT: COMPLETION: X : X
114 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:1:19 -std=gnu++98 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s
115 // CHECK-CC3: COMPLETION: bool
116 // CHECK-CC3-NEXT: COMPLETION: char
117 // CHECK-CC3-NEXT: COMPLETION: class
118 // CHECK-CC3-NEXT: COMPLETION: const
119 // CHECK-CC3-NEXT: COMPLETION: double
120 // CHECK-CC3-NEXT: COMPLETION: enum
121 // CHECK-CC3-NEXT: COMPLETION: explicit
122 // CHECK-CC3-NEXT: COMPLETION: extern
123 // CHECK-CC3-NEXT: COMPLETION: float
124 // CHECK-CC3-NEXT: COMPLETION: friend
125 // CHECK-CC3-NEXT: COMPLETION: inline
126 // CHECK-CC3-NEXT: COMPLETION: int
127 // CHECK-CC3-NEXT: COMPLETION: long
128 // CHECK-CC3-NEXT: COMPLETION: mutable
129 // CHECK-CC3-NEXT: COMPLETION: operator
130 // CHECK-CC3-NEXT: COMPLETION: Pattern : private:
131 // CHECK-CC3-NEXT: COMPLETION: Pattern : protected:
132 // CHECK-CC3-NEXT: COMPLETION: Pattern : public:
133 // CHECK-CC3-NEXT: COMPLETION: short
134 // CHECK-CC3-NEXT: COMPLETION: signed
135 // CHECK-CC3-NEXT: COMPLETION: static
136 // CHECK-CC3-NEXT: COMPLETION: struct
137 // CHECK-CC3-NEXT: COMPLETION: Pattern : template<<#parameters#>>
138 // CHECK-CC3-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>;
139 // CHECK-CC3-NEXT: COMPLETION: Pattern : typename <#name#>
140 // CHECK-CC3-NEXT: COMPLETION: Pattern : typeof <#expression#>
141 // CHECK-CC3-NEXT: COMPLETION: Pattern : typeof(<#type#>)
142 // CHECK-CC3-NEXT: COMPLETION: union
143 // CHECK-CC3-NEXT: COMPLETION: unsigned
144 // CHECK-CC3-NEXT: COMPLETION: Pattern : using <#qualifier#>::<#name#>;
145 // CHECK-CC3-NOT: COMPLETION: Pattern : using <#name#> = <#type#>;
146 // CHECK-CC3-NEXT: COMPLETION: virtual
147 // CHECK-CC3-NEXT: COMPLETION: void
148 // CHECK-CC3-NEXT: COMPLETION: volatile
149 // CHECK-CC3-NEXT: COMPLETION: wchar_t
150 // CHECK-CC3-NEXT: COMPLETION: X : X
152 // RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -code-completion-patterns -code-completion-at=%s:6:11 -std=gnu++98 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s
153 // CHECK-CC4: COMPLETION: bool
154 // CHECK-CC4-NEXT: COMPLETION: char
155 // CHECK-CC4-NEXT: COMPLETION: class
156 // CHECK-CC4-NEXT: COMPLETION: const
157 // CHECK-CC4-NEXT: COMPLETION: Pattern : const_cast<<#type#>>(<#expression#>)
158 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#void#]delete <#expression#>
159 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#void#]delete [] <#expression#>
160 // CHECK-CC4-NEXT: COMPLETION: double
161 // CHECK-CC4-NEXT: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
162 // CHECK-CC4-NEXT: COMPLETION: enum
163 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#bool#]false
164 // CHECK-CC4-NEXT: COMPLETION: float
165 // CHECK-CC4-NEXT: COMPLETION: foo : [#void#]foo()
166 // CHECK-CC4-NEXT: COMPLETION: int
167 // CHECK-CC4-NEXT: COMPLETION: long
168 // CHECK-CC4-NEXT: COMPLETION: Pattern : new <#type#>(<#expressions#>)
169 // CHECK-CC4-NEXT: COMPLETION: Pattern : new <#type#>[<#size#>](<#expressions#>)
170 // CHECK-CC4-NEXT: COMPLETION: operator
171 // CHECK-CC4-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type#>>(<#expression#>)
172 // CHECK-CC4-NEXT: COMPLETION: short
173 // CHECK-CC4-NEXT: COMPLETION: signed
174 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#size_t#]sizeof(<#expression-or-type#>)
175 // CHECK-CC4-NEXT: COMPLETION: Pattern : static_cast<<#type#>>(<#expression#>)
176 // CHECK-CC4-NEXT: COMPLETION: struct
177 // CHECK-CC4-NEXT: COMPLETION: t : t
178 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#void#]throw <#expression#>
179 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#bool#]true
180 // CHECK-CC4-NEXT: COMPLETION: TYPEDEF : TYPEDEF
181 // CHECK-CC4-NEXT: COMPLETION: Pattern : [#std::type_info#]typeid(<#expression-or-type#>)
182 // CHECK-CC4-NEXT: COMPLETION: Pattern : typename <#name#>
183 // CHECK-CC4-NEXT: COMPLETION: Pattern : typeof <#expression#>
184 // CHECK-CC4-NEXT: COMPLETION: Pattern : typeof(<#type#>)
185 // CHECK-CC4-NEXT: COMPLETION: union
186 // CHECK-CC4-NEXT: COMPLETION: unsigned
187 // CHECK-CC4-NEXT: COMPLETION: void
188 // CHECK-CC4-NEXT: COMPLETION: volatile
189 // CHECK-CC4-NEXT: COMPLETION: wchar_t
190 // CHECK-CC4-NEXT: COMPLETION: X : X
191 // CHECK-CC4-NEXT: COMPLETION: z : [#void#]z(<#int#>)
193 // RUN: %clang_cc1 -fsyntax-only -fno-rtti -code-completion-patterns -code-completion-at=%s:6:14 -std=gnu++98 %s -o - | FileCheck -check-prefix=CHECK-NO-RTTI %s
194 // CHECK-NO-RTTI: COMPLETION: bool
195 // CHECK-NO-RTTI-NEXT: COMPLETION: char
196 // CHECK-NO-RTTI-NEXT: COMPLETION: class
197 // CHECK-NO-RTTI-NEXT: COMPLETION: const
198 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : const_cast<<#type#>>(<#expression#>)
199 // CHECK-NO-RTTI: COMPLETION: Pattern : [#void#]delete <#expression#>
200 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : [#void#]delete [] <#expression#>
201 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : do {
202 // CHECK-NO-RTTI: COMPLETION: double
203 // CHECK-NO-RTTI-NOT: dynamic_cast
204 // CHECK-NO-RTTI: COMPLETION: enum
205 // CHECK-NO-RTTI-NEXT: COMPLETION: extern
206 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : [#bool#]false
207 // CHECK-NO-RTTI-NEXT: COMPLETION: float
208 // CHECK-NO-RTTI-NEXT: COMPLETION: foo : [#void#]foo()
209 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : for (<#init-statement#>; <#condition#>; <#inc-expression#>) {
210 // CHECK-NO-RTTI: COMPLETION: Pattern : goto <#label#>;
211 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : if (<#condition#>) {
212 // CHECK-NO-RTTI: COMPLETION: int
213 // CHECK-NO-RTTI-NEXT: COMPLETION: long
214 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : new <#type#>(<#expressions#>)
215 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : new <#type#>[<#size#>](<#expressions#>)
216 // CHECK-NO-RTTI-NEXT: COMPLETION: operator
217 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : reinterpret_cast<<#type#>>(<#expression#>)
218 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : return;
219 // CHECK-NO-RTTI-NEXT: COMPLETION: short
220 // CHECK-NO-RTTI-NEXT: COMPLETION: signed
221 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : [#size_t#]sizeof(<#expression-or-type#>)
222 // CHECK-NO-RTTI-NEXT: COMPLETION: static
223 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : static_cast<<#type#>>(<#expression#>)
224 // CHECK-NO-RTTI-NEXT: COMPLETION: struct
225 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : switch (<#condition#>) {
226 // CHECK-NO-RTTI: COMPLETION: t : t
227 // CHECK-NO-RTTI-NOT: throw
228 // CHECK-NO-RTTI: COMPLETION: Pattern : [#bool#]true
229 // CHECK-NO-RTTI-NOT: try
230 // CHECK-NO-RTTI: COMPLETION: TYPEDEF : TYPEDEF
231 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : typedef <#type#> <#name#>;
232 // CHECK-NO-RTTI-NOT: typeid
233 // CHECK-NO-RTTI: COMPLETION: Pattern : typename <#name#>
234 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : typeof <#expression#>
235 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : typeof(<#type#>)
236 // CHECK-NO-RTTI-NEXT: COMPLETION: union
237 // CHECK-NO-RTTI-NEXT: COMPLETION: unsigned
238 // CHECK-NO-RTTI-NOT: COMPLETION: Pattern : using <#name#> = <#type#>;
239 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : using namespace <#identifier#>;
240 // CHECK-NO-RTTI-NEXT: COMPLETION: void
241 // CHECK-NO-RTTI-NEXT: COMPLETION: volatile
242 // CHECK-NO-RTTI-NEXT: COMPLETION: wchar_t
243 // CHECK-NO-RTTI-NEXT: COMPLETION: Pattern : while (<#condition#>) {
244 // CHECK-NO-RTTI: COMPLETION: X : X
245 // CHECK-NO-RTTI-NEXT: COMPLETION: y : [#int#]y
246 // CHECK-NO-RTTI-NEXT: COMPLETION: z : [#void#]z(<#int#>)