Warning: That file was not part of the compilation database. It may have many parsing errors.

1//===--- TokenKinds.def - C Family Token Kind Database ----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the TokenKind database. This includes normal tokens like
11// tok::ampamp (corresponding to the && token) as well as keywords for various
12// languages. Users of this file must optionally #define the TOK, KEYWORD,
13// CXX11_KEYWORD, CONCEPTS_KEYWORD, ALIAS, or PPKEYWORD macros to make use of
14// this file.
15//
16//===----------------------------------------------------------------------===//
17
18#ifndef TOK
19#define TOK(X)
20#endif
21#ifndef PUNCTUATOR
22#define PUNCTUATOR(X,Y) TOK(X)
23#endif
24#ifndef KEYWORD
25#define KEYWORD(X,Y) TOK(kw_ ## X)
26#endif
27#ifndef CXX11_KEYWORD
28#define CXX11_KEYWORD(X,Y) KEYWORD(X,KEYCXX11|(Y))
29#endif
30#ifndef CXX2A_KEYWORD
31#define CXX2A_KEYWORD(X,Y) KEYWORD(X,KEYCXX2A|(Y))
32#endif
33#ifndef CONCEPTS_KEYWORD
34#define CONCEPTS_KEYWORD(X) CXX2A_KEYWORD(X,KEYCONCEPTS)
35#endif
36#ifndef MODULES_KEYWORD
37#define MODULES_KEYWORD(X) KEYWORD(X,KEYMODULES)
38#endif
39#ifndef TYPE_TRAIT
40#define TYPE_TRAIT(N,I,K) KEYWORD(I,K)
41#endif
42#ifndef TYPE_TRAIT_1
43#define TYPE_TRAIT_1(I,E,K) TYPE_TRAIT(1,I,K)
44#endif
45#ifndef TYPE_TRAIT_2
46#define TYPE_TRAIT_2(I,E,K) TYPE_TRAIT(2,I,K)
47#endif
48#ifndef TYPE_TRAIT_N
49#define TYPE_TRAIT_N(I,E,K) TYPE_TRAIT(0,I,K)
50#endif
51#ifndef ALIAS
52#define ALIAS(X,Y,Z)
53#endif
54#ifndef PPKEYWORD
55#define PPKEYWORD(X)
56#endif
57#ifndef CXX_KEYWORD_OPERATOR
58#define CXX_KEYWORD_OPERATOR(X,Y)
59#endif
60#ifndef OBJC1_AT_KEYWORD
61#define OBJC1_AT_KEYWORD(X)
62#endif
63#ifndef OBJC2_AT_KEYWORD
64#define OBJC2_AT_KEYWORD(X)
65#endif
66#ifndef TESTING_KEYWORD
67#define TESTING_KEYWORD(X, L) KEYWORD(X, L)
68#endif
69#ifndef ANNOTATION
70#define ANNOTATION(X) TOK(annot_ ## X)
71#endif
72
73//===----------------------------------------------------------------------===//
74// Preprocessor keywords.
75//===----------------------------------------------------------------------===//
76
77// These have meaning after a '#' at the start of a line. These define enums in
78// the tok::pp_* namespace. Note that IdentifierInfo::getPPKeywordID must be
79// manually updated if something is added here.
80PPKEYWORD(not_keyword)
81
82// C99 6.10.1 - Conditional Inclusion.
83PPKEYWORD(if)
84PPKEYWORD(ifdef)
85PPKEYWORD(ifndef)
86PPKEYWORD(elif)
87PPKEYWORD(else)
88PPKEYWORD(endif)
89PPKEYWORD(defined)
90
91// C99 6.10.2 - Source File Inclusion.
92PPKEYWORD(include)
93PPKEYWORD(__include_macros)
94
95// C99 6.10.3 - Macro Replacement.
96PPKEYWORD(define)
97PPKEYWORD(undef)
98
99// C99 6.10.4 - Line Control.
100PPKEYWORD(line)
101
102// C99 6.10.5 - Error Directive.
103PPKEYWORD(error)
104
105// C99 6.10.6 - Pragma Directive.
106PPKEYWORD(pragma)
107
108// GNU Extensions.
109PPKEYWORD(import)
110PPKEYWORD(include_next)
111PPKEYWORD(warning)
112PPKEYWORD(ident)
113PPKEYWORD(sccs)
114PPKEYWORD(assert)
115PPKEYWORD(unassert)
116
117// Clang extensions
118PPKEYWORD(__public_macro)
119PPKEYWORD(__private_macro)
120
121//===----------------------------------------------------------------------===//
122// Language keywords.
123//===----------------------------------------------------------------------===//
124
125// These define members of the tok::* namespace.
126
127TOK(unknown) // Not a token.
128TOK(eof) // End of file.
129TOK(eod) // End of preprocessing directive (end of line inside a
130 // directive).
131TOK(code_completion) // Code completion marker
132
133// C99 6.4.9: Comments.
134TOK(comment) // Comment (only in -E -C[C] mode)
135
136// C99 6.4.2: Identifiers.
137TOK(identifier) // abcde123
138TOK(raw_identifier) // Used only in raw lexing mode.
139
140// C99 6.4.4.1: Integer Constants
141// C99 6.4.4.2: Floating Constants
142TOK(numeric_constant) // 0x123
143
144// C99 6.4.4: Character Constants
145TOK(char_constant) // 'a'
146TOK(wide_char_constant) // L'b'
147
148// C++17 Character Constants
149TOK(utf8_char_constant) // u8'a'
150
151// C++11 Character Constants
152TOK(utf16_char_constant) // u'a'
153TOK(utf32_char_constant) // U'a'
154
155// C99 6.4.5: String Literals.
156TOK(string_literal) // "foo"
157TOK(wide_string_literal) // L"foo"
158TOK(angle_string_literal)// <foo>
159
160// C++11 String Literals.
161TOK(utf8_string_literal) // u8"foo"
162TOK(utf16_string_literal)// u"foo"
163TOK(utf32_string_literal)// U"foo"
164
165// C99 6.4.6: Punctuators.
166PUNCTUATOR(l_square, "[")
167PUNCTUATOR(r_square, "]")
168PUNCTUATOR(l_paren, "(")
169PUNCTUATOR(r_paren, ")")
170PUNCTUATOR(l_brace, "{")
171PUNCTUATOR(r_brace, "}")
172PUNCTUATOR(period, ".")
173PUNCTUATOR(ellipsis, "...")
174PUNCTUATOR(amp, "&")
175PUNCTUATOR(ampamp, "&&")
176PUNCTUATOR(ampequal, "&=")
177PUNCTUATOR(star, "*")
178PUNCTUATOR(starequal, "*=")
179PUNCTUATOR(plus, "+")
180PUNCTUATOR(plusplus, "++")
181PUNCTUATOR(plusequal, "+=")
182PUNCTUATOR(minus, "-")
183PUNCTUATOR(arrow, "->")
184PUNCTUATOR(minusminus, "--")
185PUNCTUATOR(minusequal, "-=")
186PUNCTUATOR(tilde, "~")
187PUNCTUATOR(exclaim, "!")
188PUNCTUATOR(exclaimequal, "!=")
189PUNCTUATOR(slash, "/")
190PUNCTUATOR(slashequal, "/=")
191PUNCTUATOR(percent, "%")
192PUNCTUATOR(percentequal, "%=")
193PUNCTUATOR(less, "<")
194PUNCTUATOR(lessless, "<<")
195PUNCTUATOR(lessequal, "<=")
196PUNCTUATOR(lesslessequal, "<<=")
197PUNCTUATOR(spaceship, "<=>")
198PUNCTUATOR(greater, ">")
199PUNCTUATOR(greatergreater, ">>")
200PUNCTUATOR(greaterequal, ">=")
201PUNCTUATOR(greatergreaterequal, ">>=")
202PUNCTUATOR(caret, "^")
203PUNCTUATOR(caretequal, "^=")
204PUNCTUATOR(pipe, "|")
205PUNCTUATOR(pipepipe, "||")
206PUNCTUATOR(pipeequal, "|=")
207PUNCTUATOR(question, "?")
208PUNCTUATOR(colon, ":")
209PUNCTUATOR(semi, ";")
210PUNCTUATOR(equal, "=")
211PUNCTUATOR(equalequal, "==")
212PUNCTUATOR(comma, ",")
213PUNCTUATOR(hash, "#")
214PUNCTUATOR(hashhash, "##")
215PUNCTUATOR(hashat, "#@")
216
217// C++ Support
218PUNCTUATOR(periodstar, ".*")
219PUNCTUATOR(arrowstar, "->*")
220PUNCTUATOR(coloncolon, "::")
221
222// Objective C support.
223PUNCTUATOR(at, "@")
224
225// CUDA support.
226PUNCTUATOR(lesslessless, "<<<")
227PUNCTUATOR(greatergreatergreater, ">>>")
228
229// CL support
230PUNCTUATOR(caretcaret, "^^")
231
232// C99 6.4.1: Keywords. These turn into kw_* tokens.
233// Flags allowed:
234// KEYALL - This is a keyword in all variants of C and C++, or it
235// is a keyword in the implementation namespace that should
236// always be treated as a keyword
237// KEYC99 - This is a keyword introduced to C in C99
238// KEYC11 - This is a keyword introduced to C in C11
239// KEYCXX - This is a C++ keyword, or a C++-specific keyword in the
240// implementation namespace
241// KEYNOCXX - This is a keyword in every non-C++ dialect.
242// KEYCXX11 - This is a C++ keyword introduced to C++ in C++11
243// KEYCXX2A - This is a C++ keyword introduced to C++ in C++2a
244// KEYCONCEPTS - This is a keyword if the C++ extensions for concepts
245// are enabled.
246// KEYMODULES - This is a keyword if the C++ extensions for modules
247// are enabled.
248// KEYGNU - This is a keyword if GNU extensions are enabled
249// KEYMS - This is a keyword if Microsoft extensions are enabled
250// KEYNOMS18 - This is a keyword that must never be enabled under
251// MSVC <= v18.
252// KEYOPENCLC - This is a keyword in OpenCL C
253// KEYOPENCLCXX - This is a keyword in OpenCL C++
254// KEYNOOPENCL - This is a keyword that is not supported in OpenCL C
255// nor in OpenCL C++.
256// KEYALTIVEC - This is a keyword in AltiVec
257// KEYZVECTOR - This is a keyword for the System z vector extensions,
258// which are heavily based on AltiVec
259// KEYBORLAND - This is a keyword if Borland extensions are enabled
260// KEYCOROUTINES - This is a keyword if support for the C++ coroutines
261// TS is enabled
262// BOOLSUPPORT - This is a keyword if 'bool' is a built-in type
263// HALFSUPPORT - This is a keyword if 'half' is a built-in type
264// WCHARSUPPORT - This is a keyword if 'wchar_t' is a built-in type
265// CHAR8SUPPORT - This is a keyword if 'char8_t' is a built-in type
266//
267KEYWORD(auto , KEYALL)
268KEYWORD(break , KEYALL)
269KEYWORD(case , KEYALL)
270KEYWORD(char , KEYALL)
271KEYWORD(const , KEYALL)
272KEYWORD(continue , KEYALL)
273KEYWORD(default , KEYALL)
274KEYWORD(do , KEYALL)
275KEYWORD(double , KEYALL)
276KEYWORD(else , KEYALL)
277KEYWORD(enum , KEYALL)
278KEYWORD(extern , KEYALL)
279KEYWORD(float , KEYALL)
280KEYWORD(for , KEYALL)
281KEYWORD(goto , KEYALL)
282KEYWORD(if , KEYALL)
283KEYWORD(inline , KEYC99|KEYCXX|KEYGNU)
284KEYWORD(int , KEYALL)
285KEYWORD(long , KEYALL)
286KEYWORD(register , KEYALL)
287KEYWORD(restrict , KEYC99)
288KEYWORD(return , KEYALL)
289KEYWORD(short , KEYALL)
290KEYWORD(signed , KEYALL)
291KEYWORD(sizeof , KEYALL)
292KEYWORD(static , KEYALL)
293KEYWORD(struct , KEYALL)
294KEYWORD(switch , KEYALL)
295KEYWORD(typedef , KEYALL)
296KEYWORD(union , KEYALL)
297KEYWORD(unsigned , KEYALL)
298KEYWORD(void , KEYALL)
299KEYWORD(volatile , KEYALL)
300KEYWORD(while , KEYALL)
301KEYWORD(_Alignas , KEYALL)
302KEYWORD(_Alignof , KEYALL)
303KEYWORD(_Atomic , KEYALL|KEYNOOPENCL)
304KEYWORD(_Bool , KEYNOCXX)
305KEYWORD(_Complex , KEYALL)
306KEYWORD(_Generic , KEYALL)
307KEYWORD(_Imaginary , KEYALL)
308KEYWORD(_Noreturn , KEYALL)
309KEYWORD(_Static_assert , KEYALL)
310KEYWORD(_Thread_local , KEYALL)
311KEYWORD(__func__ , KEYALL)
312KEYWORD(__objc_yes , KEYALL)
313KEYWORD(__objc_no , KEYALL)
314
315
316// C++ 2.11p1: Keywords.
317KEYWORD(asm , KEYCXX|KEYGNU)
318KEYWORD(bool , BOOLSUPPORT)
319KEYWORD(catch , KEYCXX)
320KEYWORD(class , KEYCXX)
321KEYWORD(const_cast , KEYCXX)
322KEYWORD(delete , KEYCXX)
323KEYWORD(dynamic_cast , KEYCXX)
324KEYWORD(explicit , KEYCXX)
325KEYWORD(export , KEYCXX)
326KEYWORD(false , BOOLSUPPORT)
327KEYWORD(friend , KEYCXX)
328KEYWORD(mutable , KEYCXX)
329KEYWORD(namespace , KEYCXX)
330KEYWORD(new , KEYCXX)
331KEYWORD(operator , KEYCXX)
332KEYWORD(private , KEYCXX)
333KEYWORD(protected , KEYCXX)
334KEYWORD(public , KEYCXX)
335KEYWORD(reinterpret_cast , KEYCXX)
336KEYWORD(static_cast , KEYCXX)
337KEYWORD(template , KEYCXX)
338KEYWORD(this , KEYCXX)
339KEYWORD(throw , KEYCXX)
340KEYWORD(true , BOOLSUPPORT)
341KEYWORD(try , KEYCXX)
342KEYWORD(typename , KEYCXX)
343KEYWORD(typeid , KEYCXX)
344KEYWORD(using , KEYCXX)
345KEYWORD(virtual , KEYCXX)
346KEYWORD(wchar_t , WCHARSUPPORT)
347
348// C++ 2.5p2: Alternative Representations.
349CXX_KEYWORD_OPERATOR(and , ampamp)
350CXX_KEYWORD_OPERATOR(and_eq , ampequal)
351CXX_KEYWORD_OPERATOR(bitand , amp)
352CXX_KEYWORD_OPERATOR(bitor , pipe)
353CXX_KEYWORD_OPERATOR(compl , tilde)
354CXX_KEYWORD_OPERATOR(not , exclaim)
355CXX_KEYWORD_OPERATOR(not_eq , exclaimequal)
356CXX_KEYWORD_OPERATOR(or , pipepipe)
357CXX_KEYWORD_OPERATOR(or_eq , pipeequal)
358CXX_KEYWORD_OPERATOR(xor , caret)
359CXX_KEYWORD_OPERATOR(xor_eq , caretequal)
360
361// C++11 keywords
362CXX11_KEYWORD(alignas , 0)
363CXX11_KEYWORD(alignof , 0)
364CXX11_KEYWORD(char16_t , KEYNOMS18)
365CXX11_KEYWORD(char32_t , KEYNOMS18)
366CXX11_KEYWORD(constexpr , 0)
367CXX11_KEYWORD(decltype , 0)
368CXX11_KEYWORD(noexcept , 0)
369CXX11_KEYWORD(nullptr , 0)
370CXX11_KEYWORD(static_assert , 0)
371CXX11_KEYWORD(thread_local , 0)
372
373// C++2a / concepts TS keywords
374CONCEPTS_KEYWORD(concept)
375CONCEPTS_KEYWORD(requires)
376
377// C++ coroutines TS keywords
378KEYWORD(co_await , KEYCOROUTINES)
379KEYWORD(co_return , KEYCOROUTINES)
380KEYWORD(co_yield , KEYCOROUTINES)
381
382// C++ modules TS keywords
383MODULES_KEYWORD(module)
384MODULES_KEYWORD(import)
385
386// C++ char8_t proposal
387KEYWORD(char8_t , CHAR8SUPPORT)
388
389// C11 Extension
390KEYWORD(_Float16 , KEYALL)
391
392// ISO/IEC JTC1 SC22 WG14 N1169 Extension
393KEYWORD(_Accum , KEYNOCXX)
394KEYWORD(_Fract , KEYNOCXX)
395KEYWORD(_Sat , KEYNOCXX)
396
397// GNU Extensions (in impl-reserved namespace)
398KEYWORD(_Decimal32 , KEYALL)
399KEYWORD(_Decimal64 , KEYALL)
400KEYWORD(_Decimal128 , KEYALL)
401KEYWORD(__null , KEYCXX)
402KEYWORD(__alignof , KEYALL)
403KEYWORD(__attribute , KEYALL)
404KEYWORD(__builtin_choose_expr , KEYALL)
405KEYWORD(__builtin_offsetof , KEYALL)
406// __builtin_types_compatible_p is a GNU C extension that we handle like a C++
407// type trait.
408TYPE_TRAIT_2(__builtin_types_compatible_p, TypeCompatible, KEYNOCXX)
409KEYWORD(__builtin_va_arg , KEYALL)
410KEYWORD(__extension__ , KEYALL)
411KEYWORD(__float128 , KEYALL)
412KEYWORD(__imag , KEYALL)
413KEYWORD(__int128 , KEYALL)
414KEYWORD(__label__ , KEYALL)
415KEYWORD(__real , KEYALL)
416KEYWORD(__thread , KEYALL)
417KEYWORD(__FUNCTION__ , KEYALL)
418KEYWORD(__PRETTY_FUNCTION__ , KEYALL)
419KEYWORD(__auto_type , KEYALL)
420
421// GNU Extensions (outside impl-reserved namespace)
422KEYWORD(typeof , KEYGNU)
423
424// MS Extensions
425KEYWORD(__FUNCDNAME__ , KEYMS)
426KEYWORD(__FUNCSIG__ , KEYMS)
427KEYWORD(L__FUNCTION__ , KEYMS)
428KEYWORD(L__FUNCSIG__ , KEYMS)
429TYPE_TRAIT_1(__is_interface_class, IsInterfaceClass, KEYMS)
430TYPE_TRAIT_1(__is_sealed, IsSealed, KEYMS)
431
432// MSVC12.0 / VS2013 Type Traits
433TYPE_TRAIT_1(__is_destructible, IsDestructible, KEYMS)
434TYPE_TRAIT_1(__is_trivially_destructible, IsTriviallyDestructible, KEYCXX)
435TYPE_TRAIT_1(__is_nothrow_destructible, IsNothrowDestructible, KEYMS)
436TYPE_TRAIT_2(__is_nothrow_assignable, IsNothrowAssignable, KEYCXX)
437TYPE_TRAIT_N(__is_constructible, IsConstructible, KEYCXX)
438TYPE_TRAIT_N(__is_nothrow_constructible, IsNothrowConstructible, KEYCXX)
439
440// MSVC14.0 / VS2015 Type Traits
441TYPE_TRAIT_2(__is_assignable, IsAssignable, KEYCXX)
442
443// GNU and MS Type Traits
444TYPE_TRAIT_1(__has_nothrow_assign, HasNothrowAssign, KEYCXX)
445TYPE_TRAIT_1(__has_nothrow_move_assign, HasNothrowMoveAssign, KEYCXX)
446TYPE_TRAIT_1(__has_nothrow_copy, HasNothrowCopy, KEYCXX)
447TYPE_TRAIT_1(__has_nothrow_constructor, HasNothrowConstructor, KEYCXX)
448TYPE_TRAIT_1(__has_trivial_assign, HasTrivialAssign, KEYCXX)
449TYPE_TRAIT_1(__has_trivial_move_assign, HasTrivialMoveAssign, KEYCXX)
450TYPE_TRAIT_1(__has_trivial_copy, HasTrivialCopy, KEYCXX)
451TYPE_TRAIT_1(__has_trivial_constructor, HasTrivialDefaultConstructor, KEYCXX)
452TYPE_TRAIT_1(__has_trivial_move_constructor, HasTrivialMoveConstructor, KEYCXX)
453TYPE_TRAIT_1(__has_trivial_destructor, HasTrivialDestructor, KEYCXX)
454TYPE_TRAIT_1(__has_virtual_destructor, HasVirtualDestructor, KEYCXX)
455TYPE_TRAIT_1(__is_abstract, IsAbstract, KEYCXX)
456TYPE_TRAIT_1(__is_aggregate, IsAggregate, KEYCXX)
457TYPE_TRAIT_2(__is_base_of, IsBaseOf, KEYCXX)
458TYPE_TRAIT_1(__is_class, IsClass, KEYCXX)
459TYPE_TRAIT_2(__is_convertible_to, IsConvertibleTo, KEYCXX)
460TYPE_TRAIT_1(__is_empty, IsEmpty, KEYCXX)
461TYPE_TRAIT_1(__is_enum, IsEnum, KEYCXX)
462TYPE_TRAIT_1(__is_final, IsFinal, KEYCXX)
463TYPE_TRAIT_1(__is_literal, IsLiteral, KEYCXX)
464// Name for GCC 4.6 compatibility - people have already written libraries using
465// this name unfortunately.
466ALIAS("__is_literal_type", __is_literal, KEYCXX)
467TYPE_TRAIT_1(__is_pod, IsPOD, KEYCXX)
468TYPE_TRAIT_1(__is_polymorphic, IsPolymorphic, KEYCXX)
469TYPE_TRAIT_1(__is_trivial, IsTrivial, KEYCXX)
470TYPE_TRAIT_1(__is_union, IsUnion, KEYCXX)
471TYPE_TRAIT_1(__has_unique_object_representations,
472 HasUniqueObjectRepresentations, KEYCXX)
473
474// Clang-only C++ Type Traits
475TYPE_TRAIT_N(__is_trivially_constructible, IsTriviallyConstructible, KEYCXX)
476TYPE_TRAIT_1(__is_trivially_copyable, IsTriviallyCopyable, KEYCXX)
477TYPE_TRAIT_2(__is_trivially_assignable, IsTriviallyAssignable, KEYCXX)
478TYPE_TRAIT_2(__reference_binds_to_temporary, ReferenceBindsToTemporary, KEYCXX)
479KEYWORD(__underlying_type , KEYCXX)
480
481// Embarcadero Expression Traits
482KEYWORD(__is_lvalue_expr , KEYCXX)
483KEYWORD(__is_rvalue_expr , KEYCXX)
484
485// Embarcadero Unary Type Traits
486TYPE_TRAIT_1(__is_arithmetic, IsArithmetic, KEYCXX)
487TYPE_TRAIT_1(__is_floating_point, IsFloatingPoint, KEYCXX)
488TYPE_TRAIT_1(__is_integral, IsIntegral, KEYCXX)
489TYPE_TRAIT_1(__is_complete_type, IsCompleteType, KEYCXX)
490TYPE_TRAIT_1(__is_void, IsVoid, KEYCXX)
491TYPE_TRAIT_1(__is_array, IsArray, KEYCXX)
492TYPE_TRAIT_1(__is_function, IsFunction, KEYCXX)
493TYPE_TRAIT_1(__is_reference, IsReference, KEYCXX)
494TYPE_TRAIT_1(__is_lvalue_reference, IsLvalueReference, KEYCXX)
495TYPE_TRAIT_1(__is_rvalue_reference, IsRvalueReference, KEYCXX)
496TYPE_TRAIT_1(__is_fundamental, IsFundamental, KEYCXX)
497TYPE_TRAIT_1(__is_object, IsObject, KEYCXX)
498TYPE_TRAIT_1(__is_scalar, IsScalar, KEYCXX)
499TYPE_TRAIT_1(__is_compound, IsCompound, KEYCXX)
500TYPE_TRAIT_1(__is_pointer, IsPointer, KEYCXX)
501TYPE_TRAIT_1(__is_member_object_pointer, IsMemberObjectPointer, KEYCXX)
502TYPE_TRAIT_1(__is_member_function_pointer, IsMemberFunctionPointer, KEYCXX)
503TYPE_TRAIT_1(__is_member_pointer, IsMemberPointer, KEYCXX)
504TYPE_TRAIT_1(__is_const, IsConst, KEYCXX)
505TYPE_TRAIT_1(__is_volatile, IsVolatile, KEYCXX)
506TYPE_TRAIT_1(__is_standard_layout, IsStandardLayout, KEYCXX)
507TYPE_TRAIT_1(__is_signed, IsSigned, KEYCXX)
508TYPE_TRAIT_1(__is_unsigned, IsUnsigned, KEYCXX)
509
510// Embarcadero Binary Type Traits
511TYPE_TRAIT_2(__is_same, IsSame, KEYCXX)
512TYPE_TRAIT_2(__is_convertible, IsConvertible, KEYCXX)
513KEYWORD(__array_rank , KEYCXX)
514KEYWORD(__array_extent , KEYCXX)
515
516// Apple Extension.
517KEYWORD(__private_extern__ , KEYALL)
518KEYWORD(__module_private__ , KEYALL)
519
520// Extension that will be enabled for Microsoft, Borland and PS4, but can be
521// disabled via '-fno-declspec'.
522KEYWORD(__declspec , 0)
523
524// Microsoft Extension.
525KEYWORD(__cdecl , KEYALL)
526KEYWORD(__stdcall , KEYALL)
527KEYWORD(__fastcall , KEYALL)
528KEYWORD(__thiscall , KEYALL)
529KEYWORD(__regcall , KEYALL)
530KEYWORD(__vectorcall , KEYALL)
531KEYWORD(__forceinline , KEYMS)
532KEYWORD(__unaligned , KEYMS)
533KEYWORD(__super , KEYMS)
534
535// OpenCL address space qualifiers
536KEYWORD(__global , KEYOPENCLC | KEYOPENCLCXX)
537KEYWORD(__local , KEYOPENCLC | KEYOPENCLCXX)
538KEYWORD(__constant , KEYOPENCLC | KEYOPENCLCXX)
539KEYWORD(__private , KEYOPENCLC | KEYOPENCLCXX)
540KEYWORD(__generic , KEYOPENCLC | KEYOPENCLCXX)
541ALIAS("global", __global , KEYOPENCLC)
542ALIAS("local", __local , KEYOPENCLC)
543ALIAS("constant", __constant , KEYOPENCLC)
544ALIAS("private", __private , KEYOPENCLC)
545ALIAS("generic", __generic , KEYOPENCLC)
546// OpenCL function qualifiers
547KEYWORD(__kernel , KEYOPENCLC | KEYOPENCLCXX)
548ALIAS("kernel", __kernel , KEYOPENCLC | KEYOPENCLCXX)
549// OpenCL access qualifiers
550KEYWORD(__read_only , KEYOPENCLC | KEYOPENCLCXX)
551KEYWORD(__write_only , KEYOPENCLC | KEYOPENCLCXX)
552KEYWORD(__read_write , KEYOPENCLC | KEYOPENCLCXX)
553ALIAS("read_only", __read_only , KEYOPENCLC | KEYOPENCLCXX)
554ALIAS("write_only", __write_only , KEYOPENCLC | KEYOPENCLCXX)
555ALIAS("read_write", __read_write , KEYOPENCLC | KEYOPENCLCXX)
556// OpenCL builtins
557KEYWORD(__builtin_astype , KEYOPENCLC)
558KEYWORD(vec_step , KEYOPENCLC | KEYALTIVEC | KEYZVECTOR)
559#define GENERIC_IMAGE_TYPE(ImgType, Id) KEYWORD(ImgType##_t, KEYOPENCLC)
560#include "clang/Basic/OpenCLImageTypes.def"
561
562// OpenMP Type Traits
563KEYWORD(__builtin_omp_required_simd_align, KEYALL)
564
565KEYWORD(pipe , KEYOPENCLC)
566
567// Borland Extensions.
568KEYWORD(__pascal , KEYALL)
569
570// Altivec Extension.
571KEYWORD(__vector , KEYALTIVEC|KEYZVECTOR)
572KEYWORD(__pixel , KEYALTIVEC)
573KEYWORD(__bool , KEYALTIVEC|KEYZVECTOR)
574
575// ARM NEON extensions.
576ALIAS("__fp16", half , KEYALL)
577
578// OpenCL Extension.
579KEYWORD(half , HALFSUPPORT)
580
581// Objective-C ARC keywords.
582KEYWORD(__bridge , KEYARC)
583KEYWORD(__bridge_transfer , KEYARC)
584KEYWORD(__bridge_retained , KEYARC)
585KEYWORD(__bridge_retain , KEYARC)
586
587// Objective-C keywords.
588KEYWORD(__covariant , KEYOBJC2)
589KEYWORD(__contravariant , KEYOBJC2)
590KEYWORD(__kindof , KEYOBJC2)
591
592// Alternate spelling for various tokens. There are GCC extensions in all
593// languages, but should not be disabled in strict conformance mode.
594ALIAS("__alignof__" , __alignof , KEYALL)
595ALIAS("__asm" , asm , KEYALL)
596ALIAS("__asm__" , asm , KEYALL)
597ALIAS("__attribute__", __attribute, KEYALL)
598ALIAS("__complex" , _Complex , KEYALL)
599ALIAS("__complex__" , _Complex , KEYALL)
600ALIAS("__const" , const , KEYALL)
601ALIAS("__const__" , const , KEYALL)
602ALIAS("__decltype" , decltype , KEYCXX)
603ALIAS("__imag__" , __imag , KEYALL)
604ALIAS("__inline" , inline , KEYALL)
605ALIAS("__inline__" , inline , KEYALL)
606ALIAS("__nullptr" , nullptr , KEYCXX)
607ALIAS("__real__" , __real , KEYALL)
608ALIAS("__restrict" , restrict , KEYALL)
609ALIAS("__restrict__" , restrict , KEYALL)
610ALIAS("__signed" , signed , KEYALL)
611ALIAS("__signed__" , signed , KEYALL)
612ALIAS("__typeof" , typeof , KEYALL)
613ALIAS("__typeof__" , typeof , KEYALL)
614ALIAS("__volatile" , volatile , KEYALL)
615ALIAS("__volatile__" , volatile , KEYALL)
616
617// Type nullability.
618KEYWORD(_Nonnull , KEYALL)
619KEYWORD(_Nullable , KEYALL)
620KEYWORD(_Null_unspecified , KEYALL)
621
622// Microsoft extensions which should be disabled in strict conformance mode
623KEYWORD(__ptr64 , KEYMS)
624KEYWORD(__ptr32 , KEYMS)
625KEYWORD(__sptr , KEYMS)
626KEYWORD(__uptr , KEYMS)
627KEYWORD(__w64 , KEYMS)
628KEYWORD(__uuidof , KEYMS | KEYBORLAND)
629KEYWORD(__try , KEYMS | KEYBORLAND)
630KEYWORD(__finally , KEYMS | KEYBORLAND)
631KEYWORD(__leave , KEYMS | KEYBORLAND)
632KEYWORD(__int64 , KEYMS)
633KEYWORD(__if_exists , KEYMS)
634KEYWORD(__if_not_exists , KEYMS)
635KEYWORD(__single_inheritance , KEYMS)
636KEYWORD(__multiple_inheritance , KEYMS)
637KEYWORD(__virtual_inheritance , KEYMS)
638KEYWORD(__interface , KEYMS)
639ALIAS("__int8" , char , KEYMS)
640ALIAS("_int8" , char , KEYMS)
641ALIAS("__int16" , short , KEYMS)
642ALIAS("_int16" , short , KEYMS)
643ALIAS("__int32" , int , KEYMS)
644ALIAS("_int32" , int , KEYMS)
645ALIAS("_int64" , __int64 , KEYMS)
646ALIAS("__wchar_t" , wchar_t , KEYMS)
647ALIAS("_asm" , asm , KEYMS)
648ALIAS("_alignof" , __alignof , KEYMS)
649ALIAS("__builtin_alignof", __alignof , KEYMS)
650ALIAS("_cdecl" , __cdecl , KEYMS | KEYBORLAND)
651ALIAS("_fastcall" , __fastcall , KEYMS | KEYBORLAND)
652ALIAS("_stdcall" , __stdcall , KEYMS | KEYBORLAND)
653ALIAS("_thiscall" , __thiscall , KEYMS)
654ALIAS("_vectorcall" , __vectorcall, KEYMS)
655ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND)
656ALIAS("_inline" , inline , KEYMS)
657ALIAS("_declspec" , __declspec , KEYMS)
658
659// Borland Extensions which should be disabled in strict conformance mode.
660ALIAS("_pascal" , __pascal , KEYBORLAND)
661
662// Clang Extensions.
663KEYWORD(__builtin_convertvector , KEYALL)
664ALIAS("__char16_t" , char16_t , KEYCXX)
665ALIAS("__char32_t" , char32_t , KEYCXX)
666
667KEYWORD(__builtin_available , KEYALL)
668
669// Clang-specific keywords enabled only in testing.
670TESTING_KEYWORD(__unknown_anytype , KEYALL)
671
672
673//===----------------------------------------------------------------------===//
674// Objective-C @-preceded keywords.
675//===----------------------------------------------------------------------===//
676
677// These have meaning after an '@' in Objective-C mode. These define enums in
678// the tok::objc_* namespace.
679
680OBJC1_AT_KEYWORD(not_keyword)
681OBJC1_AT_KEYWORD(class)
682OBJC1_AT_KEYWORD(compatibility_alias)
683OBJC1_AT_KEYWORD(defs)
684OBJC1_AT_KEYWORD(encode)
685OBJC1_AT_KEYWORD(end)
686OBJC1_AT_KEYWORD(implementation)
687OBJC1_AT_KEYWORD(interface)
688OBJC1_AT_KEYWORD(private)
689OBJC1_AT_KEYWORD(protected)
690OBJC1_AT_KEYWORD(protocol)
691OBJC1_AT_KEYWORD(public)
692OBJC1_AT_KEYWORD(selector)
693OBJC1_AT_KEYWORD(throw)
694OBJC1_AT_KEYWORD(try)
695OBJC1_AT_KEYWORD(catch)
696OBJC1_AT_KEYWORD(finally)
697OBJC1_AT_KEYWORD(synchronized)
698OBJC1_AT_KEYWORD(autoreleasepool)
699
700OBJC2_AT_KEYWORD(property)
701OBJC2_AT_KEYWORD(package)
702OBJC2_AT_KEYWORD(required)
703OBJC2_AT_KEYWORD(optional)
704OBJC2_AT_KEYWORD(synthesize)
705OBJC2_AT_KEYWORD(dynamic)
706OBJC2_AT_KEYWORD(import)
707OBJC2_AT_KEYWORD(available)
708
709// TODO: What to do about context-sensitive keywords like:
710// bycopy/byref/in/inout/oneway/out?
711
712ANNOTATION(cxxscope) // annotation for a C++ scope spec, e.g. "::foo::bar::"
713ANNOTATION(typename) // annotation for a C typedef name, a C++ (possibly
714 // qualified) typename, e.g. "foo::MyClass", or
715 // template-id that names a type ("std::vector<int>")
716ANNOTATION(template_id) // annotation for a C++ template-id that names a
717 // function template specialization (not a type),
718 // e.g., "std::swap<int>"
719ANNOTATION(primary_expr) // annotation for a primary expression
720ANNOTATION(decltype) // annotation for a decltype expression,
721 // e.g., "decltype(foo.bar())"
722
723// Annotation for #pragma unused(...)
724// For each argument inside the parentheses the pragma handler will produce
725// one 'pragma_unused' annotation token followed by the argument token.
726ANNOTATION(pragma_unused)
727
728// Annotation for #pragma GCC visibility...
729// The lexer produces these so that they only take effect when the parser
730// handles them.
731ANNOTATION(pragma_vis)
732
733// Annotation for #pragma pack...
734// The lexer produces these so that they only take effect when the parser
735// handles them.
736ANNOTATION(pragma_pack)
737
738// Annotation for #pragma clang __debug parser_crash...
739// The lexer produces these so that they only take effect when the parser
740// handles them.
741ANNOTATION(pragma_parser_crash)
742
743// Annotation for #pragma clang __debug captured...
744// The lexer produces these so that they only take effect when the parser
745// handles them.
746ANNOTATION(pragma_captured)
747
748// Annotation for #pragma clang __debug dump...
749// The lexer produces these so that the parser and semantic analysis can
750// look up and dump the operand.
751ANNOTATION(pragma_dump)
752
753// Annotation for #pragma ms_struct...
754// The lexer produces these so that they only take effect when the parser
755// handles them.
756ANNOTATION(pragma_msstruct)
757
758// Annotation for #pragma align...
759// The lexer produces these so that they only take effect when the parser
760// handles them.
761ANNOTATION(pragma_align)
762
763// Annotation for #pragma weak id
764// The lexer produces these so that they only take effect when the parser
765// handles them.
766ANNOTATION(pragma_weak)
767
768// Annotation for #pragma weak id = id
769// The lexer produces these so that they only take effect when the parser
770// handles them.
771ANNOTATION(pragma_weakalias)
772
773// Annotation for #pragma redefine_extname...
774// The lexer produces these so that they only take effect when the parser
775// handles them.
776ANNOTATION(pragma_redefine_extname)
777
778// Annotation for #pragma STDC FP_CONTRACT...
779// The lexer produces these so that they only take effect when the parser
780// handles them.
781ANNOTATION(pragma_fp_contract)
782
783// Annotation for #pragma pointers_to_members...
784// The lexer produces these so that they only take effect when the parser
785// handles them.
786ANNOTATION(pragma_ms_pointers_to_members)
787
788// Annotation for #pragma vtordisp...
789// The lexer produces these so that they only take effect when the parser
790// handles them.
791ANNOTATION(pragma_ms_vtordisp)
792
793// Annotation for all microsoft #pragmas...
794// The lexer produces these so that they only take effect when the parser
795// handles them.
796ANNOTATION(pragma_ms_pragma)
797
798// Annotation for #pragma OPENCL EXTENSION...
799// The lexer produces these so that they only take effect when the parser
800// handles them.
801ANNOTATION(pragma_opencl_extension)
802
803// Annotations for OpenMP pragma directives - #pragma omp ...
804// The lexer produces these so that they only take effect when the parser
805// handles #pragma omp ... directives.
806ANNOTATION(pragma_openmp)
807ANNOTATION(pragma_openmp_end)
808
809// Annotations for loop pragma directives #pragma clang loop ...
810// The lexer produces these so that they only take effect when the parser
811// handles #pragma loop ... directives.
812ANNOTATION(pragma_loop_hint)
813
814ANNOTATION(pragma_fp)
815
816// Annotation for the attribute pragma directives - #pragma clang attribute ...
817ANNOTATION(pragma_attribute)
818
819// Annotations for module import translated from #include etc.
820ANNOTATION(module_include)
821ANNOTATION(module_begin)
822ANNOTATION(module_end)
823
824#undef ANNOTATION
825#undef TESTING_KEYWORD
826#undef OBJC2_AT_KEYWORD
827#undef OBJC1_AT_KEYWORD
828#undef CXX_KEYWORD_OPERATOR
829#undef PPKEYWORD
830#undef ALIAS
831#undef TYPE_TRAIT_N
832#undef TYPE_TRAIT_2
833#undef TYPE_TRAIT_1
834#undef TYPE_TRAIT
835#undef CONCEPTS_KEYWORD
836#undef CXX2A_KEYWORD
837#undef CXX11_KEYWORD
838#undef KEYWORD
839#undef PUNCTUATOR
840#undef TOK
841

Warning: That file was not part of the compilation database. It may have many parsing errors.