1//===--- TokenKinds.def - C Family Token Kind Database ----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the TokenKind database. This includes normal tokens like
10// tok::ampamp (corresponding to the && token) as well as keywords for various
11// languages. Users of this file must optionally #define the TOK, KEYWORD,
12// CXX11_KEYWORD, ALIAS, or PPKEYWORD macros to make use of this file.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef TOK
17#define TOK(X)
18#endif
19#ifndef PUNCTUATOR
20#define PUNCTUATOR(X,Y) TOK(X)
21#endif
22#ifndef KEYWORD
23#define KEYWORD(X,Y) TOK(kw_ ## X)
24#endif
25#ifndef CXX11_KEYWORD
26#define CXX11_KEYWORD(X,Y) KEYWORD(X,KEYCXX11|(Y))
27#endif
28#ifndef CXX20_KEYWORD
29#define CXX20_KEYWORD(X,Y) KEYWORD(X,KEYCXX20|(Y))
30#endif
31#ifndef C99_KEYWORD
32#define C99_KEYWORD(X,Y) KEYWORD(X,KEYC99|(Y))
33#endif
34#ifndef C23_KEYWORD
35#define C23_KEYWORD(X,Y) KEYWORD(X,KEYC23|(Y))
36#endif
37#ifndef COROUTINES_KEYWORD
38#define COROUTINES_KEYWORD(X) CXX20_KEYWORD(X,KEYCOROUTINES)
39#endif
40#ifndef MODULES_KEYWORD
41#define MODULES_KEYWORD(X) KEYWORD(X,KEYMODULES)
42#endif
43#ifndef TYPE_TRAIT
44#define TYPE_TRAIT(N,I,K) KEYWORD(I,K)
45#endif
46#ifndef TYPE_TRAIT_1
47#define TYPE_TRAIT_1(I,E,K) TYPE_TRAIT(1,I,K)
48#endif
49#ifndef TYPE_TRAIT_2
50#define TYPE_TRAIT_2(I,E,K) TYPE_TRAIT(2,I,K)
51#endif
52#ifndef TYPE_TRAIT_N
53#define TYPE_TRAIT_N(I,E,K) TYPE_TRAIT(0,I,K)
54#endif
55#ifndef ARRAY_TYPE_TRAIT
56#define ARRAY_TYPE_TRAIT(I,E,K) KEYWORD(I,K)
57#endif
58#ifndef UNARY_EXPR_OR_TYPE_TRAIT
59#define UNARY_EXPR_OR_TYPE_TRAIT(I,E,K) KEYWORD(I,K)
60#endif
61#ifndef CXX11_UNARY_EXPR_OR_TYPE_TRAIT
62#define CXX11_UNARY_EXPR_OR_TYPE_TRAIT(I,E,K) CXX11_KEYWORD(I,K)
63#endif
64#ifndef EXPRESSION_TRAIT
65#define EXPRESSION_TRAIT(I,E,K) KEYWORD(I,K)
66#endif
67#ifndef ALIAS
68#define ALIAS(X,Y,Z)
69#endif
70#ifndef PPKEYWORD
71#define PPKEYWORD(X)
72#endif
73#ifndef CXX_KEYWORD_OPERATOR
74#define CXX_KEYWORD_OPERATOR(X,Y)
75#endif
76#ifndef OBJC_AT_KEYWORD
77#define OBJC_AT_KEYWORD(X)
78#endif
79#ifndef TESTING_KEYWORD
80#define TESTING_KEYWORD(X, L) KEYWORD(X, L)
81#endif
82#ifndef ANNOTATION
83#define ANNOTATION(X) TOK(annot_ ## X)
84#endif
85#ifndef PRAGMA_ANNOTATION
86#define PRAGMA_ANNOTATION(X) ANNOTATION(X)
87#endif
88#ifndef NOTABLE_IDENTIFIER
89#define NOTABLE_IDENTIFIER(X)
90#endif
91
92//===----------------------------------------------------------------------===//
93// Preprocessor keywords.
94//===----------------------------------------------------------------------===//
95
96// These have meaning after a '#' at the start of a line. These define enums in
97// the tok::pp_* namespace. Note that IdentifierInfo::getPPKeywordID must be
98// manually updated if something is added here.
99PPKEYWORD(not_keyword)
100
101// C99 6.10.1 - Conditional Inclusion.
102PPKEYWORD(if)
103PPKEYWORD(ifdef)
104PPKEYWORD(ifndef)
105PPKEYWORD(elif)
106PPKEYWORD(elifdef)
107PPKEYWORD(elifndef)
108PPKEYWORD(else)
109PPKEYWORD(endif)
110PPKEYWORD(defined)
111
112// C99 6.10.2 - Source File Inclusion.
113PPKEYWORD(include)
114PPKEYWORD(__include_macros)
115
116// C99 6.10.3 - Macro Replacement.
117PPKEYWORD(define)
118PPKEYWORD(undef)
119
120// C99 6.10.4 - Line Control.
121PPKEYWORD(line)
122
123// C99 6.10.5 - Error Directive.
124PPKEYWORD(error)
125
126// C99 6.10.6 - Pragma Directive.
127PPKEYWORD(pragma)
128
129// GNU Extensions.
130PPKEYWORD(import)
131PPKEYWORD(include_next)
132PPKEYWORD(warning)
133PPKEYWORD(ident)
134PPKEYWORD(sccs)
135PPKEYWORD(assert)
136PPKEYWORD(unassert)
137
138// Clang extensions
139PPKEYWORD(__public_macro)
140PPKEYWORD(__private_macro)
141
142//===----------------------------------------------------------------------===//
143// Language keywords.
144//===----------------------------------------------------------------------===//
145
146// These define members of the tok::* namespace.
147
148TOK(unknown) // Not a token.
149TOK(eof) // End of file.
150TOK(eod) // End of preprocessing directive (end of line inside a
151 // directive).
152TOK(code_completion) // Code completion marker
153
154// C99 6.4.9: Comments.
155TOK(comment) // Comment (only in -E -C[C] mode)
156
157// C99 6.4.2: Identifiers.
158TOK(identifier) // abcde123
159TOK(raw_identifier) // Used only in raw lexing mode.
160
161// C99 6.4.4.1: Integer Constants
162// C99 6.4.4.2: Floating Constants
163TOK(numeric_constant) // 0x123
164
165// C99 6.4.4: Character Constants
166TOK(char_constant) // 'a'
167TOK(wide_char_constant) // L'b'
168
169// C++17 Character Constants
170TOK(utf8_char_constant) // u8'a'
171
172// C++11 Character Constants
173TOK(utf16_char_constant) // u'a'
174TOK(utf32_char_constant) // U'a'
175
176// C99 6.4.5: String Literals.
177TOK(string_literal) // "foo"
178TOK(wide_string_literal) // L"foo"
179
180// C11 6.4.7: Header Names
181TOK(header_name) // <foo>, or "foo" lexed as a header-name
182
183// C++11 String Literals.
184TOK(utf8_string_literal) // u8"foo"
185TOK(utf16_string_literal)// u"foo"
186TOK(utf32_string_literal)// U"foo"
187
188// C99 6.4.6: Punctuators.
189PUNCTUATOR(l_square, "[")
190PUNCTUATOR(r_square, "]")
191PUNCTUATOR(l_paren, "(")
192PUNCTUATOR(r_paren, ")")
193PUNCTUATOR(l_brace, "{")
194PUNCTUATOR(r_brace, "}")
195PUNCTUATOR(period, ".")
196PUNCTUATOR(ellipsis, "...")
197PUNCTUATOR(amp, "&")
198PUNCTUATOR(ampamp, "&&")
199PUNCTUATOR(ampequal, "&=")
200PUNCTUATOR(star, "*")
201PUNCTUATOR(starequal, "*=")
202PUNCTUATOR(plus, "+")
203PUNCTUATOR(plusplus, "++")
204PUNCTUATOR(plusequal, "+=")
205PUNCTUATOR(minus, "-")
206PUNCTUATOR(arrow, "->")
207PUNCTUATOR(minusminus, "--")
208PUNCTUATOR(minusequal, "-=")
209PUNCTUATOR(tilde, "~")
210PUNCTUATOR(exclaim, "!")
211PUNCTUATOR(exclaimequal, "!=")
212PUNCTUATOR(slash, "/")
213PUNCTUATOR(slashequal, "/=")
214PUNCTUATOR(percent, "%")
215PUNCTUATOR(percentequal, "%=")
216PUNCTUATOR(less, "<")
217PUNCTUATOR(lessless, "<<")
218PUNCTUATOR(lessequal, "<=")
219PUNCTUATOR(lesslessequal, "<<=")
220PUNCTUATOR(spaceship, "<=>")
221PUNCTUATOR(greater, ">")
222PUNCTUATOR(greatergreater, ">>")
223PUNCTUATOR(greaterequal, ">=")
224PUNCTUATOR(greatergreaterequal, ">>=")
225PUNCTUATOR(caret, "^")
226PUNCTUATOR(caretequal, "^=")
227PUNCTUATOR(pipe, "|")
228PUNCTUATOR(pipepipe, "||")
229PUNCTUATOR(pipeequal, "|=")
230PUNCTUATOR(question, "?")
231PUNCTUATOR(colon, ":")
232PUNCTUATOR(semi, ";")
233PUNCTUATOR(equal, "=")
234PUNCTUATOR(equalequal, "==")
235PUNCTUATOR(comma, ",")
236PUNCTUATOR(hash, "#")
237PUNCTUATOR(hashhash, "##")
238PUNCTUATOR(hashat, "#@")
239
240// C++ Support
241PUNCTUATOR(periodstar, ".*")
242PUNCTUATOR(arrowstar, "->*")
243PUNCTUATOR(coloncolon, "::")
244
245// Objective C support.
246PUNCTUATOR(at, "@")
247
248// CUDA support.
249PUNCTUATOR(lesslessless, "<<<")
250PUNCTUATOR(greatergreatergreater, ">>>")
251
252// CL support
253PUNCTUATOR(caretcaret, "^^")
254
255// C99 6.4.1: Keywords. These turn into kw_* tokens.
256// Flags allowed:
257// KEYALL - This is a keyword in all variants of C and C++, or it
258// is a keyword in the implementation namespace that should
259// always be treated as a keyword
260// KEYC99 - This is a keyword introduced to C in C99
261// KEYC11 - This is a keyword introduced to C in C11
262// KEYC23 - This is a keyword introduced to C in C23
263// KEYCXX - This is a C++ keyword, or a C++-specific keyword in the
264// implementation namespace
265// KEYNOCXX - This is a keyword in every non-C++ dialect.
266// KEYCXX11 - This is a C++ keyword introduced to C++ in C++11
267// KEYCXX20 - This is a C++ keyword introduced to C++ in C++20
268// KEYMODULES - This is a keyword if the C++ extensions for modules
269// are enabled.
270// KEYGNU - This is a keyword if GNU extensions are enabled
271// KEYMS - This is a keyword if Microsoft extensions are enabled
272// KEYMSCOMPAT - This is a keyword if Microsoft compatibility mode is enabled
273// KEYNOMS18 - This is a keyword that must never be enabled under
274// MSVC <= v18.
275// KEYOPENCLC - This is a keyword in OpenCL C
276// KEYOPENCLCXX - This is a keyword in C++ for OpenCL
277// KEYNOOPENCL - This is a keyword that is not supported in OpenCL
278// KEYALTIVEC - This is a keyword in AltiVec
279// KEYZVECTOR - This is a keyword for the System z vector extensions,
280// which are heavily based on AltiVec
281// KEYBORLAND - This is a keyword if Borland extensions are enabled
282// KEYCOROUTINES - This is a keyword if support for C++ coroutines is enabled
283// BOOLSUPPORT - This is a keyword if 'bool' is a built-in type
284// HALFSUPPORT - This is a keyword if 'half' is a built-in type
285// WCHARSUPPORT - This is a keyword if 'wchar_t' is a built-in type
286// CHAR8SUPPORT - This is a keyword if 'char8_t' is a built-in type
287// KEYFIXEDPOINT - This is a keyword according to the N1169 fixed point
288// extension.
289//
290KEYWORD(auto , KEYALL)
291KEYWORD(break , KEYALL)
292KEYWORD(case , KEYALL)
293KEYWORD(char , KEYALL)
294KEYWORD(const , KEYALL)
295KEYWORD(continue , KEYALL)
296KEYWORD(default , KEYALL)
297KEYWORD(do , KEYALL)
298KEYWORD(double , KEYALL)
299KEYWORD(else , KEYALL)
300KEYWORD(enum , KEYALL)
301KEYWORD(extern , KEYALL)
302KEYWORD(float , KEYALL)
303KEYWORD(for , KEYALL)
304KEYWORD(goto , KEYALL)
305KEYWORD(if , KEYALL)
306KEYWORD(int , KEYALL)
307KEYWORD(_ExtInt , KEYALL)
308KEYWORD(_BitInt , KEYALL)
309KEYWORD(long , KEYALL)
310KEYWORD(register , KEYALL)
311KEYWORD(return , KEYALL)
312KEYWORD(short , KEYALL)
313KEYWORD(signed , KEYALL)
314UNARY_EXPR_OR_TYPE_TRAIT(sizeof, SizeOf, KEYALL)
315UNARY_EXPR_OR_TYPE_TRAIT(__datasizeof, DataSizeOf, KEYCXX)
316KEYWORD(static , KEYALL)
317KEYWORD(struct , KEYALL)
318KEYWORD(switch , KEYALL)
319KEYWORD(typedef , KEYALL)
320KEYWORD(union , KEYALL)
321KEYWORD(unsigned , KEYALL)
322KEYWORD(void , KEYALL)
323KEYWORD(volatile , KEYALL)
324KEYWORD(while , KEYALL)
325KEYWORD(_Alignas , KEYALL)
326KEYWORD(_Alignof , KEYALL)
327KEYWORD(_Atomic , KEYALL|KEYNOOPENCL)
328KEYWORD(_Bool , KEYNOCXX)
329KEYWORD(_Complex , KEYALL)
330KEYWORD(_Generic , KEYALL)
331KEYWORD(_Imaginary , KEYALL)
332KEYWORD(_Noreturn , KEYALL)
333KEYWORD(_Static_assert , KEYALL)
334KEYWORD(_Thread_local , KEYALL)
335KEYWORD(__func__ , KEYALL)
336KEYWORD(__objc_yes , KEYALL)
337KEYWORD(__objc_no , KEYALL)
338
339
340// C++ 2.11p1: Keywords.
341KEYWORD(asm , KEYCXX|KEYGNU)
342KEYWORD(bool , BOOLSUPPORT|KEYC23)
343KEYWORD(catch , KEYCXX)
344KEYWORD(class , KEYCXX)
345KEYWORD(const_cast , KEYCXX)
346KEYWORD(delete , KEYCXX)
347KEYWORD(dynamic_cast , KEYCXX)
348KEYWORD(explicit , KEYCXX)
349KEYWORD(export , KEYCXX)
350KEYWORD(false , BOOLSUPPORT|KEYC23)
351KEYWORD(friend , KEYCXX)
352KEYWORD(mutable , KEYCXX)
353KEYWORD(namespace , KEYCXX)
354KEYWORD(new , KEYCXX)
355KEYWORD(operator , KEYCXX)
356KEYWORD(private , KEYCXX)
357KEYWORD(protected , KEYCXX)
358KEYWORD(public , KEYCXX)
359KEYWORD(reinterpret_cast , KEYCXX)
360KEYWORD(static_cast , KEYCXX)
361KEYWORD(template , KEYCXX)
362KEYWORD(this , KEYCXX)
363KEYWORD(throw , KEYCXX)
364KEYWORD(true , BOOLSUPPORT|KEYC23)
365KEYWORD(try , KEYCXX)
366KEYWORD(typename , KEYCXX)
367KEYWORD(typeid , KEYCXX)
368KEYWORD(using , KEYCXX)
369KEYWORD(virtual , KEYCXX)
370KEYWORD(wchar_t , WCHARSUPPORT)
371
372// C++ 2.5p2: Alternative Representations.
373CXX_KEYWORD_OPERATOR(and , ampamp)
374CXX_KEYWORD_OPERATOR(and_eq , ampequal)
375CXX_KEYWORD_OPERATOR(bitand , amp)
376CXX_KEYWORD_OPERATOR(bitor , pipe)
377CXX_KEYWORD_OPERATOR(compl , tilde)
378CXX_KEYWORD_OPERATOR(not , exclaim)
379CXX_KEYWORD_OPERATOR(not_eq , exclaimequal)
380CXX_KEYWORD_OPERATOR(or , pipepipe)
381CXX_KEYWORD_OPERATOR(or_eq , pipeequal)
382CXX_KEYWORD_OPERATOR(xor , caret)
383CXX_KEYWORD_OPERATOR(xor_eq , caretequal)
384
385// C99 Keywords.
386C99_KEYWORD(restrict , 0)
387C99_KEYWORD(inline , KEYCXX|KEYGNU)
388
389
390// C++11 keywords
391CXX11_KEYWORD(alignas , KEYC23)
392// alignof and _Alignof return the required ABI alignment
393CXX11_UNARY_EXPR_OR_TYPE_TRAIT(alignof, AlignOf, KEYC23)
394CXX11_KEYWORD(char16_t , KEYNOMS18)
395CXX11_KEYWORD(char32_t , KEYNOMS18)
396CXX11_KEYWORD(constexpr , KEYC23)
397CXX11_KEYWORD(decltype , 0)
398CXX11_KEYWORD(noexcept , 0)
399CXX11_KEYWORD(nullptr , KEYC23)
400CXX11_KEYWORD(static_assert , KEYMSCOMPAT|KEYC23)
401CXX11_KEYWORD(thread_local , KEYC23)
402
403// C++20 / coroutines keywords
404COROUTINES_KEYWORD(co_await)
405COROUTINES_KEYWORD(co_return)
406COROUTINES_KEYWORD(co_yield)
407
408// C++20 keywords
409MODULES_KEYWORD(module)
410MODULES_KEYWORD(import)
411
412// C++20 keywords.
413CXX20_KEYWORD(consteval , 0)
414CXX20_KEYWORD(constinit , 0)
415CXX20_KEYWORD(concept , 0)
416CXX20_KEYWORD(requires , 0)
417
418// Not a CXX20_KEYWORD because it is disabled by -fno-char8_t.
419KEYWORD(char8_t , CHAR8SUPPORT)
420
421// C11 Extension
422KEYWORD(_Float16 , KEYALL)
423
424// C23 keywords
425C23_KEYWORD(typeof , KEYGNU)
426C23_KEYWORD(typeof_unqual , 0)
427
428// ISO/IEC JTC1 SC22 WG14 N1169 Extension
429KEYWORD(_Accum , KEYFIXEDPOINT)
430KEYWORD(_Fract , KEYFIXEDPOINT)
431KEYWORD(_Sat , KEYFIXEDPOINT)
432
433// GNU Extensions (in impl-reserved namespace)
434KEYWORD(_Decimal32 , KEYALL)
435KEYWORD(_Decimal64 , KEYALL)
436KEYWORD(_Decimal128 , KEYALL)
437KEYWORD(__null , KEYCXX)
438// __alignof returns the preferred alignment of a type, the alignment
439// clang will attempt to give an object of the type if allowed by ABI.
440UNARY_EXPR_OR_TYPE_TRAIT(__alignof, PreferredAlignOf, KEYALL)
441KEYWORD(__attribute , KEYALL)
442KEYWORD(__builtin_choose_expr , KEYALL)
443KEYWORD(__builtin_offsetof , KEYALL)
444KEYWORD(__builtin_FILE , KEYALL)
445KEYWORD(__builtin_FILE_NAME , KEYALL)
446KEYWORD(__builtin_FUNCTION , KEYALL)
447KEYWORD(__builtin_FUNCSIG , KEYMS)
448KEYWORD(__builtin_LINE , KEYALL)
449KEYWORD(__builtin_COLUMN , KEYALL)
450KEYWORD(__builtin_source_location , KEYCXX)
451
452// __builtin_types_compatible_p is a GNU C extension that we handle like a C++
453// type trait.
454TYPE_TRAIT_2(__builtin_types_compatible_p, TypeCompatible, KEYNOCXX)
455KEYWORD(__builtin_va_arg , KEYALL)
456KEYWORD(__extension__ , KEYALL)
457KEYWORD(__float128 , KEYALL)
458KEYWORD(__ibm128 , KEYALL)
459KEYWORD(__imag , KEYALL)
460KEYWORD(__int128 , KEYALL)
461KEYWORD(__label__ , KEYALL)
462KEYWORD(__real , KEYALL)
463KEYWORD(__thread , KEYALL)
464KEYWORD(__FUNCTION__ , KEYALL)
465KEYWORD(__PRETTY_FUNCTION__ , KEYALL)
466KEYWORD(__auto_type , KEYALL)
467
468// MS Extensions
469KEYWORD(__FUNCDNAME__ , KEYMS)
470KEYWORD(__FUNCSIG__ , KEYMS)
471KEYWORD(L__FUNCTION__ , KEYMS)
472KEYWORD(L__FUNCSIG__ , KEYMS)
473TYPE_TRAIT_1(__is_interface_class, IsInterfaceClass, KEYMS)
474TYPE_TRAIT_1(__is_sealed, IsSealed, KEYMS)
475
476// MSVC12.0 / VS2013 Type Traits
477TYPE_TRAIT_1(__is_destructible, IsDestructible, KEYALL)
478TYPE_TRAIT_1(__is_trivially_destructible, IsTriviallyDestructible, KEYCXX)
479TYPE_TRAIT_1(__is_nothrow_destructible, IsNothrowDestructible, KEYALL)
480TYPE_TRAIT_2(__is_nothrow_assignable, IsNothrowAssignable, KEYCXX)
481TYPE_TRAIT_N(__is_constructible, IsConstructible, KEYCXX)
482TYPE_TRAIT_N(__is_nothrow_constructible, IsNothrowConstructible, KEYCXX)
483
484// MSVC14.0 / VS2015 Type Traits
485TYPE_TRAIT_2(__is_assignable, IsAssignable, KEYCXX)
486
487// MSVC Type Traits of unknown vintage
488TYPE_TRAIT_1(__has_nothrow_move_assign, HasNothrowMoveAssign, KEYCXX)
489TYPE_TRAIT_1(__has_trivial_move_assign, HasTrivialMoveAssign, KEYCXX)
490TYPE_TRAIT_1(__has_trivial_move_constructor, HasTrivialMoveConstructor, KEYCXX)
491
492// GNU and MS Type Traits
493TYPE_TRAIT_1(__has_nothrow_assign, HasNothrowAssign, KEYCXX)
494TYPE_TRAIT_1(__has_nothrow_copy, HasNothrowCopy, KEYCXX)
495TYPE_TRAIT_1(__has_nothrow_constructor, HasNothrowConstructor, KEYCXX)
496TYPE_TRAIT_1(__has_trivial_assign, HasTrivialAssign, KEYCXX)
497TYPE_TRAIT_1(__has_trivial_copy, HasTrivialCopy, KEYCXX)
498TYPE_TRAIT_1(__has_trivial_constructor, HasTrivialDefaultConstructor, KEYCXX)
499TYPE_TRAIT_1(__has_trivial_destructor, HasTrivialDestructor, KEYCXX)
500TYPE_TRAIT_1(__has_virtual_destructor, HasVirtualDestructor, KEYCXX)
501TYPE_TRAIT_1(__is_abstract, IsAbstract, KEYCXX)
502TYPE_TRAIT_1(__is_aggregate, IsAggregate, KEYCXX)
503TYPE_TRAIT_2(__is_base_of, IsBaseOf, KEYCXX)
504TYPE_TRAIT_1(__is_class, IsClass, KEYCXX)
505TYPE_TRAIT_2(__is_convertible_to, IsConvertibleTo, KEYCXX)
506TYPE_TRAIT_1(__is_empty, IsEmpty, KEYCXX)
507TYPE_TRAIT_1(__is_enum, IsEnum, KEYCXX)
508TYPE_TRAIT_1(__is_final, IsFinal, KEYCXX)
509TYPE_TRAIT_1(__is_literal, IsLiteral, KEYCXX)
510// Name for GCC 4.6 compatibility - people have already written libraries using
511// this name unfortunately.
512ALIAS("__is_literal_type", __is_literal, KEYCXX)
513TYPE_TRAIT_1(__is_pod, IsPOD, KEYCXX)
514TYPE_TRAIT_1(__is_polymorphic, IsPolymorphic, KEYCXX)
515TYPE_TRAIT_1(__is_standard_layout, IsStandardLayout, KEYCXX)
516TYPE_TRAIT_1(__is_trivial, IsTrivial, KEYCXX)
517TYPE_TRAIT_2(__is_trivially_assignable, IsTriviallyAssignable, KEYCXX)
518TYPE_TRAIT_N(__is_trivially_constructible, IsTriviallyConstructible, KEYCXX)
519TYPE_TRAIT_1(__is_trivially_copyable, IsTriviallyCopyable, KEYCXX)
520TYPE_TRAIT_1(__is_union, IsUnion, KEYCXX)
521TYPE_TRAIT_1(__has_unique_object_representations,
522 HasUniqueObjectRepresentations, KEYCXX)
523TYPE_TRAIT_2(__is_layout_compatible, IsLayoutCompatible, KEYCXX)
524TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, IsPointerInterconvertibleBaseOf, KEYCXX)
525
526#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) KEYWORD(__##Trait, KEYCXX)
527#include "clang/Basic/TransformTypeTraits.def"
528
529// Clang-only C++ Type Traits
530TYPE_TRAIT_1(__is_trivially_relocatable, IsTriviallyRelocatable, KEYCXX)
531TYPE_TRAIT_1(__is_trivially_equality_comparable, IsTriviallyEqualityComparable, KEYCXX)
532TYPE_TRAIT_1(__is_bounded_array, IsBoundedArray, KEYCXX)
533TYPE_TRAIT_1(__is_unbounded_array, IsUnboundedArray, KEYCXX)
534TYPE_TRAIT_1(__is_nullptr, IsNullPointer, KEYCXX)
535TYPE_TRAIT_1(__is_scoped_enum, IsScopedEnum, KEYCXX)
536TYPE_TRAIT_1(__is_referenceable, IsReferenceable, KEYCXX)
537TYPE_TRAIT_1(__can_pass_in_regs, CanPassInRegs, KEYCXX)
538TYPE_TRAIT_2(__reference_binds_to_temporary, ReferenceBindsToTemporary, KEYCXX)
539TYPE_TRAIT_2(__reference_constructs_from_temporary, ReferenceConstructsFromTemporary, KEYCXX)
540
541// Embarcadero Expression Traits
542EXPRESSION_TRAIT(__is_lvalue_expr, IsLValueExpr, KEYCXX)
543EXPRESSION_TRAIT(__is_rvalue_expr, IsRValueExpr, KEYCXX)
544
545// Embarcadero Unary Type Traits
546TYPE_TRAIT_1(__is_arithmetic, IsArithmetic, KEYCXX)
547TYPE_TRAIT_1(__is_floating_point, IsFloatingPoint, KEYCXX)
548TYPE_TRAIT_1(__is_integral, IsIntegral, KEYCXX)
549TYPE_TRAIT_1(__is_complete_type, IsCompleteType, KEYCXX)
550TYPE_TRAIT_1(__is_void, IsVoid, KEYCXX)
551TYPE_TRAIT_1(__is_array, IsArray, KEYCXX)
552TYPE_TRAIT_1(__is_function, IsFunction, KEYCXX)
553TYPE_TRAIT_1(__is_reference, IsReference, KEYCXX)
554TYPE_TRAIT_1(__is_lvalue_reference, IsLvalueReference, KEYCXX)
555TYPE_TRAIT_1(__is_rvalue_reference, IsRvalueReference, KEYCXX)
556TYPE_TRAIT_1(__is_fundamental, IsFundamental, KEYCXX)
557TYPE_TRAIT_1(__is_object, IsObject, KEYCXX)
558TYPE_TRAIT_1(__is_scalar, IsScalar, KEYCXX)
559TYPE_TRAIT_1(__is_compound, IsCompound, KEYCXX)
560TYPE_TRAIT_1(__is_pointer, IsPointer, KEYCXX)
561TYPE_TRAIT_1(__is_member_object_pointer, IsMemberObjectPointer, KEYCXX)
562TYPE_TRAIT_1(__is_member_function_pointer, IsMemberFunctionPointer, KEYCXX)
563TYPE_TRAIT_1(__is_member_pointer, IsMemberPointer, KEYCXX)
564TYPE_TRAIT_1(__is_const, IsConst, KEYCXX)
565TYPE_TRAIT_1(__is_volatile, IsVolatile, KEYCXX)
566TYPE_TRAIT_1(__is_signed, IsSigned, KEYCXX)
567TYPE_TRAIT_1(__is_unsigned, IsUnsigned, KEYCXX)
568
569// Embarcadero Binary Type Traits
570TYPE_TRAIT_2(__is_same, IsSame, KEYCXX)
571TYPE_TRAIT_2(__is_convertible, IsConvertible, KEYCXX)
572TYPE_TRAIT_2(__is_nothrow_convertible, IsNothrowConvertible, KEYCXX)
573ARRAY_TYPE_TRAIT(__array_rank, ArrayRank, KEYCXX)
574ARRAY_TYPE_TRAIT(__array_extent, ArrayExtent, KEYCXX)
575// Name for GCC 6 compatibility.
576ALIAS("__is_same_as", __is_same, KEYCXX)
577
578// Apple Extension.
579KEYWORD(__private_extern__ , KEYALL)
580KEYWORD(__module_private__ , KEYALL)
581
582// Extension that will be enabled for Microsoft, Borland and PS4, but can be
583// disabled via '-fno-declspec'.
584KEYWORD(__declspec , 0)
585
586// Microsoft Extension.
587KEYWORD(__cdecl , KEYALL)
588KEYWORD(__stdcall , KEYALL)
589KEYWORD(__fastcall , KEYALL)
590KEYWORD(__thiscall , KEYALL)
591KEYWORD(__regcall , KEYALL)
592KEYWORD(__vectorcall , KEYALL)
593KEYWORD(__forceinline , KEYMS)
594KEYWORD(__unaligned , KEYMS)
595KEYWORD(__super , KEYMS)
596
597// OpenCL address space qualifiers
598KEYWORD(__global , KEYOPENCLC | KEYOPENCLCXX)
599KEYWORD(__local , KEYOPENCLC | KEYOPENCLCXX)
600KEYWORD(__constant , KEYOPENCLC | KEYOPENCLCXX)
601KEYWORD(__private , KEYOPENCLC | KEYOPENCLCXX)
602KEYWORD(__generic , KEYOPENCLC | KEYOPENCLCXX)
603ALIAS("global", __global , KEYOPENCLC | KEYOPENCLCXX)
604ALIAS("local", __local , KEYOPENCLC | KEYOPENCLCXX)
605ALIAS("constant", __constant , KEYOPENCLC | KEYOPENCLCXX)
606ALIAS("private", __private , KEYOPENCLC)
607ALIAS("generic", __generic , KEYOPENCLC | KEYOPENCLCXX)
608// OpenCL function qualifiers
609KEYWORD(__kernel , KEYOPENCLC | KEYOPENCLCXX)
610ALIAS("kernel", __kernel , KEYOPENCLC | KEYOPENCLCXX)
611// OpenCL access qualifiers
612KEYWORD(__read_only , KEYOPENCLC | KEYOPENCLCXX)
613KEYWORD(__write_only , KEYOPENCLC | KEYOPENCLCXX)
614KEYWORD(__read_write , KEYOPENCLC | KEYOPENCLCXX)
615ALIAS("read_only", __read_only , KEYOPENCLC | KEYOPENCLCXX)
616ALIAS("write_only", __write_only , KEYOPENCLC | KEYOPENCLCXX)
617ALIAS("read_write", __read_write , KEYOPENCLC | KEYOPENCLCXX)
618// OpenCL builtins
619KEYWORD(__builtin_astype , KEYOPENCLC | KEYOPENCLCXX)
620UNARY_EXPR_OR_TYPE_TRAIT(vec_step, VecStep, KEYOPENCLC | KEYOPENCLCXX | KEYALTIVEC | KEYZVECTOR)
621#define GENERIC_IMAGE_TYPE(ImgType, Id) KEYWORD(ImgType##_t, KEYOPENCLC | KEYOPENCLCXX)
622#include "clang/Basic/OpenCLImageTypes.def"
623KEYWORD(pipe , KEYOPENCLC | KEYOPENCLCXX)
624// C++ for OpenCL s2.3.1: addrspace_cast operator
625KEYWORD(addrspace_cast , KEYOPENCLCXX)
626
627// CUDA/HIP function attributes
628KEYWORD(__noinline__ , KEYCUDA)
629
630// HLSL keywords.
631KEYWORD(cbuffer , KEYHLSL)
632KEYWORD(tbuffer , KEYHLSL)
633KEYWORD(groupshared , KEYHLSL)
634KEYWORD(in , KEYHLSL)
635KEYWORD(inout , KEYHLSL)
636KEYWORD(out , KEYHLSL)
637
638// OpenMP Type Traits
639UNARY_EXPR_OR_TYPE_TRAIT(__builtin_omp_required_simd_align, OpenMPRequiredSimdAlign, KEYALL)
640
641// Borland Extensions.
642KEYWORD(__pascal , KEYALL)
643
644// Altivec Extension.
645KEYWORD(__vector , KEYALTIVEC|KEYZVECTOR)
646KEYWORD(__pixel , KEYALTIVEC)
647KEYWORD(__bool , KEYALTIVEC|KEYZVECTOR)
648
649// ARM NEON extensions.
650ALIAS("__fp16", half , KEYALL)
651KEYWORD(__bf16 , KEYALL)
652
653// OpenCL Extension.
654KEYWORD(half , HALFSUPPORT)
655
656// Objective-C ARC keywords.
657KEYWORD(__bridge , KEYOBJC)
658KEYWORD(__bridge_transfer , KEYOBJC)
659KEYWORD(__bridge_retained , KEYOBJC)
660KEYWORD(__bridge_retain , KEYOBJC)
661
662// Objective-C keywords.
663KEYWORD(__covariant , KEYOBJC)
664KEYWORD(__contravariant , KEYOBJC)
665KEYWORD(__kindof , KEYOBJC)
666
667// Alternate spelling for various tokens. There are GCC extensions in all
668// languages, but should not be disabled in strict conformance mode.
669ALIAS("__alignof__" , __alignof , KEYALL)
670ALIAS("__asm" , asm , KEYALL)
671ALIAS("__asm__" , asm , KEYALL)
672ALIAS("__attribute__" , __attribute , KEYALL)
673ALIAS("__complex" , _Complex , KEYALL)
674ALIAS("__complex__" , _Complex , KEYALL)
675ALIAS("__const" , const , KEYALL)
676ALIAS("__const__" , const , KEYALL)
677ALIAS("__decltype" , decltype , KEYCXX)
678ALIAS("__imag__" , __imag , KEYALL)
679ALIAS("__inline" , inline , KEYALL)
680ALIAS("__inline__" , inline , KEYALL)
681ALIAS("__nullptr" , nullptr , KEYCXX)
682ALIAS("__real__" , __real , KEYALL)
683ALIAS("__restrict" , restrict , KEYALL)
684ALIAS("__restrict__" , restrict , KEYALL)
685ALIAS("__signed" , signed , KEYALL)
686ALIAS("__signed__" , signed , KEYALL)
687ALIAS("__typeof" , typeof , KEYALL)
688ALIAS("__typeof__" , typeof , KEYALL)
689ALIAS("__typeof_unqual" , typeof_unqual, KEYALL)
690ALIAS("__typeof_unqual__", typeof_unqual, KEYALL)
691ALIAS("__volatile" , volatile , KEYALL)
692ALIAS("__volatile__" , volatile , KEYALL)
693
694// Type nullability.
695KEYWORD(_Nonnull , KEYALL)
696KEYWORD(_Nullable , KEYALL)
697KEYWORD(_Nullable_result , KEYALL)
698KEYWORD(_Null_unspecified , KEYALL)
699
700// WebAssembly Type Extension
701KEYWORD(__funcref , KEYALL)
702
703// Microsoft extensions which should be disabled in strict conformance mode
704KEYWORD(__ptr64 , KEYMS)
705KEYWORD(__ptr32 , KEYMS)
706KEYWORD(__sptr , KEYMS)
707KEYWORD(__uptr , KEYMS)
708KEYWORD(__w64 , KEYMS)
709KEYWORD(__uuidof , KEYMS | KEYBORLAND)
710KEYWORD(__try , KEYMS | KEYBORLAND)
711KEYWORD(__finally , KEYMS | KEYBORLAND)
712KEYWORD(__leave , KEYMS | KEYBORLAND)
713KEYWORD(__int64 , KEYMS)
714KEYWORD(__if_exists , KEYMS)
715KEYWORD(__if_not_exists , KEYMS)
716KEYWORD(__single_inheritance , KEYMS)
717KEYWORD(__multiple_inheritance , KEYMS)
718KEYWORD(__virtual_inheritance , KEYMS)
719KEYWORD(__interface , KEYMS)
720ALIAS("__int8" , char , KEYMS)
721ALIAS("__int16" , short , KEYMS)
722ALIAS("__int32" , int , KEYMS)
723ALIAS("__wchar_t" , wchar_t , KEYMS)
724ALIAS("__builtin_alignof", __alignof , KEYMS)
725
726// Microsoft single-underscore prefixed aliases for double-underscore prefixed
727// keywords.
728ALIAS("_asm" , asm , KEYMS)
729ALIAS("_alignof" , __alignof , KEYMS)
730ALIAS("_cdecl" , __cdecl , KEYMS | KEYBORLAND)
731ALIAS("_declspec" , __declspec , KEYMS)
732ALIAS("_fastcall" , __fastcall , KEYMS | KEYBORLAND)
733ALIAS("_finally" , __finally , KEYMSCOMPAT)
734ALIAS("_forceinline" , __forceinline, KEYMSCOMPAT)
735ALIAS("_inline" , inline , KEYMS)
736ALIAS("_int8" , char , KEYMS)
737ALIAS("_int16" , short , KEYMS)
738ALIAS("_int32" , int , KEYMS)
739ALIAS("_int64" , __int64 , KEYMS)
740ALIAS("_leave" , __leave , KEYMSCOMPAT)
741ALIAS("_multiple_inheritance", __multiple_inheritance, KEYMSCOMPAT)
742ALIAS("_ptr32" , __ptr32 , KEYMSCOMPAT)
743ALIAS("_ptr64" , __ptr64 , KEYMSCOMPAT)
744ALIAS("_restrict" , restrict , KEYMSCOMPAT)
745ALIAS("_stdcall" , __stdcall , KEYMS | KEYBORLAND)
746ALIAS("_thiscall" , __thiscall , KEYMS)
747ALIAS("_try" , __try , KEYMSCOMPAT)
748ALIAS("_vectorcall" , __vectorcall , KEYMS)
749ALIAS("_unaligned" , __unaligned , KEYMSCOMPAT)
750ALIAS("_uptr" , __uptr , KEYMSCOMPAT)
751ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND)
752ALIAS("_virtual_inheritance", __virtual_inheritance, KEYMSCOMPAT)
753ALIAS("_w64" , __w64 , KEYMSCOMPAT)
754
755// Borland Extensions which should be disabled in strict conformance mode.
756ALIAS("_pascal" , __pascal , KEYBORLAND)
757
758// Clang Extensions.
759KEYWORD(__builtin_convertvector , KEYALL)
760UNARY_EXPR_OR_TYPE_TRAIT(__builtin_vectorelements, VectorElements, KEYALL)
761ALIAS("__char16_t" , char16_t , KEYCXX)
762ALIAS("__char32_t" , char32_t , KEYCXX)
763KEYWORD(__builtin_bit_cast , KEYALL)
764KEYWORD(__builtin_available , KEYALL)
765KEYWORD(__builtin_sycl_unique_stable_name, KEYSYCL)
766
767// Keywords defined by Attr.td.
768// The "EMPTY ## X" is used to prevent early macro-expansion of the keyword.
769#ifndef KEYWORD_ATTRIBUTE
770#define KEYWORD_ATTRIBUTE(X, HASARG, EMPTY) KEYWORD(EMPTY ## X, KEYALL)
771#endif
772#include "clang/Basic/RegularKeywordAttrInfo.inc"
773
774// Clang-specific keywords enabled only in testing.
775TESTING_KEYWORD(__unknown_anytype , KEYALL)
776
777
778//===----------------------------------------------------------------------===//
779// Objective-C @-preceded keywords.
780//===----------------------------------------------------------------------===//
781
782// These have meaning after an '@' in Objective-C mode. These define enums in
783// the tok::objc_* namespace.
784
785OBJC_AT_KEYWORD(not_keyword)
786OBJC_AT_KEYWORD(class)
787OBJC_AT_KEYWORD(compatibility_alias)
788OBJC_AT_KEYWORD(defs)
789OBJC_AT_KEYWORD(encode)
790OBJC_AT_KEYWORD(end)
791OBJC_AT_KEYWORD(implementation)
792OBJC_AT_KEYWORD(interface)
793OBJC_AT_KEYWORD(private)
794OBJC_AT_KEYWORD(protected)
795OBJC_AT_KEYWORD(protocol)
796OBJC_AT_KEYWORD(public)
797OBJC_AT_KEYWORD(selector)
798OBJC_AT_KEYWORD(throw)
799OBJC_AT_KEYWORD(try)
800OBJC_AT_KEYWORD(catch)
801OBJC_AT_KEYWORD(finally)
802OBJC_AT_KEYWORD(synchronized)
803OBJC_AT_KEYWORD(autoreleasepool)
804
805OBJC_AT_KEYWORD(property)
806OBJC_AT_KEYWORD(package)
807OBJC_AT_KEYWORD(required)
808OBJC_AT_KEYWORD(optional)
809OBJC_AT_KEYWORD(synthesize)
810OBJC_AT_KEYWORD(dynamic)
811OBJC_AT_KEYWORD(import)
812OBJC_AT_KEYWORD(available)
813
814//===----------------------------------------------------------------------===//
815// Notable identifiers.
816//===----------------------------------------------------------------------===//
817NOTABLE_IDENTIFIER(not_notable)
818NOTABLE_IDENTIFIER(FILE)
819NOTABLE_IDENTIFIER(jmp_buf)
820NOTABLE_IDENTIFIER(sigjmp_buf)
821NOTABLE_IDENTIFIER(ucontext_t)
822NOTABLE_IDENTIFIER(float_t)
823NOTABLE_IDENTIFIER(double_t)
824
825// TODO: What to do about context-sensitive keywords like:
826// bycopy/byref/in/inout/oneway/out?
827
828ANNOTATION(cxxscope) // annotation for a C++ scope spec, e.g. "::foo::bar::"
829ANNOTATION(typename) // annotation for a C typedef name, a C++ (possibly
830 // qualified) typename, e.g. "foo::MyClass", or
831 // template-id that names a type ("std::vector<int>")
832ANNOTATION(template_id) // annotation for a C++ template-id that names a
833 // function template specialization (not a type),
834 // e.g., "std::swap<int>", or a type-constraint (which
835 // might not have explicit template arguments),
836 // e.g. "C", "C<int>".
837ANNOTATION(non_type) // annotation for a single non-type declaration
838ANNOTATION(non_type_undeclared) // annotation for an undeclared identifier that
839 // was assumed to be an ADL-only function name
840ANNOTATION(non_type_dependent) // annotation for an assumed non-type member of
841 // a dependent base class
842ANNOTATION(overload_set) // annotation for an unresolved overload set
843ANNOTATION(primary_expr) // annotation for a primary expression, used when
844 // tentatively parsing a lambda init-capture or ObjC
845 // message send
846ANNOTATION(decltype) // annotation for a decltype expression,
847 // e.g., "decltype(foo.bar())"
848ANNOTATION(pack_indexing_type) // annotation for an indexed pack of type,
849 // e.g., "T...[expr]"
850
851// Annotation for #pragma unused(...)
852// For each argument inside the parentheses the pragma handler will produce
853// one 'pragma_unused' annotation token followed by the argument token.
854PRAGMA_ANNOTATION(pragma_unused)
855
856// Annotation for #pragma GCC visibility...
857// The lexer produces these so that they only take effect when the parser
858// handles them.
859PRAGMA_ANNOTATION(pragma_vis)
860
861// Annotation for #pragma pack...
862// The lexer produces these so that they only take effect when the parser
863// handles them.
864PRAGMA_ANNOTATION(pragma_pack)
865
866// Annotation for #pragma clang __debug parser_crash...
867// The lexer produces these so that they only take effect when the parser
868// handles them.
869PRAGMA_ANNOTATION(pragma_parser_crash)
870
871// Annotation for #pragma clang __debug captured...
872// The lexer produces these so that they only take effect when the parser
873// handles them.
874PRAGMA_ANNOTATION(pragma_captured)
875
876// Annotation for #pragma clang __debug dump...
877// The lexer produces these so that the parser and semantic analysis can
878// look up and dump the operand.
879PRAGMA_ANNOTATION(pragma_dump)
880
881// Annotation for #pragma ms_struct...
882// The lexer produces these so that they only take effect when the parser
883// handles them.
884PRAGMA_ANNOTATION(pragma_msstruct)
885
886// Annotation for #pragma align...
887// The lexer produces these so that they only take effect when the parser
888// handles them.
889PRAGMA_ANNOTATION(pragma_align)
890
891// Annotation for #pragma weak id
892// The lexer produces these so that they only take effect when the parser
893// handles them.
894PRAGMA_ANNOTATION(pragma_weak)
895
896// Annotation for #pragma weak id = id
897// The lexer produces these so that they only take effect when the parser
898// handles them.
899PRAGMA_ANNOTATION(pragma_weakalias)
900
901// Annotation for #pragma redefine_extname...
902// The lexer produces these so that they only take effect when the parser
903// handles them.
904PRAGMA_ANNOTATION(pragma_redefine_extname)
905
906// Annotation for #pragma STDC FP_CONTRACT...
907// The lexer produces these so that they only take effect when the parser
908// handles them.
909PRAGMA_ANNOTATION(pragma_fp_contract)
910
911// Annotations for #pragma STDC FENV_ACCESS and #pragma fenv_access (MS compat)
912// The lexer produces these so that they only take effect when the parser
913// handles them.
914PRAGMA_ANNOTATION(pragma_fenv_access)
915PRAGMA_ANNOTATION(pragma_fenv_access_ms)
916
917// Annotation for #pragma STDC FENV_ROUND
918// The lexer produces these so that they only take effect when the parser
919// handles them.
920PRAGMA_ANNOTATION(pragma_fenv_round)
921
922// Annotation for #pragma STDC CX_LIMITED_RANGE
923// The lexer produces these so that they only take effect when the parser
924// handles them.
925PRAGMA_ANNOTATION(pragma_cx_limited_range)
926
927// Annotation for #pragma float_control
928// The lexer produces these so that they only take effect when the parser
929// handles them.
930PRAGMA_ANNOTATION(pragma_float_control)
931
932// Annotation for #pragma pointers_to_members...
933// The lexer produces these so that they only take effect when the parser
934// handles them.
935PRAGMA_ANNOTATION(pragma_ms_pointers_to_members)
936
937// Annotation for #pragma vtordisp...
938// The lexer produces these so that they only take effect when the parser
939// handles them.
940PRAGMA_ANNOTATION(pragma_ms_vtordisp)
941
942// Annotation for all microsoft #pragmas...
943// The lexer produces these so that they only take effect when the parser
944// handles them.
945PRAGMA_ANNOTATION(pragma_ms_pragma)
946
947// Annotation for #pragma OPENCL EXTENSION...
948// The lexer produces these so that they only take effect when the parser
949// handles them.
950PRAGMA_ANNOTATION(pragma_opencl_extension)
951
952// Annotations for OpenMP pragma directives - #pragma omp ...
953// The parser produces this annotation token when it parses an [[omp::*]]
954// attribute. The tokens from the attribute argument list are replayed to the
955// token stream with this leading token (and a trailing pragma_openmp_end) so
956// that the parser can reuse the OpenMP parsing logic but still be able to
957// distinguish between a real pragma and a converted pragma. It is not marked
958// as a PRAGMA_ANNOTATION because it doesn't get generated from a #pragma.
959ANNOTATION(attr_openmp)
960// The lexer produces these so that they only take effect when the parser
961// handles #pragma omp ... directives.
962PRAGMA_ANNOTATION(pragma_openmp)
963PRAGMA_ANNOTATION(pragma_openmp_end)
964
965// Annotations for OpenACC pragma directives - #pragma acc.
966// Like with OpenMP, these are produced by the lexer when it parses a
967// #pragma acc directive so it can be handled during parsing of the directives.
968PRAGMA_ANNOTATION(pragma_openacc)
969PRAGMA_ANNOTATION(pragma_openacc_end)
970
971// Annotations for loop pragma directives #pragma clang loop ...
972// The lexer produces these so that they only take effect when the parser
973// handles #pragma loop ... directives.
974PRAGMA_ANNOTATION(pragma_loop_hint)
975
976PRAGMA_ANNOTATION(pragma_fp)
977
978// Annotation for the attribute pragma directives - #pragma clang attribute ...
979PRAGMA_ANNOTATION(pragma_attribute)
980
981// Annotation for the riscv pragma directives - #pragma clang riscv intrinsic ...
982PRAGMA_ANNOTATION(pragma_riscv)
983
984// Annotations for module import translated from #include etc.
985ANNOTATION(module_include)
986ANNOTATION(module_begin)
987ANNOTATION(module_end)
988
989// Annotation for a header_name token that has been looked up and transformed
990// into the name of a header unit.
991ANNOTATION(header_unit)
992
993// Annotation for end of input in clang-repl.
994ANNOTATION(repl_input_end)
995
996#undef PRAGMA_ANNOTATION
997#undef ANNOTATION
998#undef TESTING_KEYWORD
999#undef OBJC_AT_KEYWORD
1000#undef CXX_KEYWORD_OPERATOR
1001#undef PPKEYWORD
1002#undef ALIAS
1003#undef EXPRESSION_TRAIT
1004#undef CXX11_UNARY_EXPR_OR_TYPE_TRAIT
1005#undef UNARY_EXPR_OR_TYPE_TRAIT
1006#undef ARRAY_TYPE_TRAIT
1007#undef TYPE_TRAIT_N
1008#undef TYPE_TRAIT_2
1009#undef TYPE_TRAIT_1
1010#undef TYPE_TRAIT
1011#undef CXX20_KEYWORD
1012#undef CXX11_KEYWORD
1013#undef KEYWORD
1014#undef PUNCTUATOR
1015#undef TOK
1016#undef C99_KEYWORD
1017#undef C23_KEYWORD
1018#undef NOTABLE_IDENTIFIER
1019

source code of clang/include/clang/Basic/TokenKinds.def