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