Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

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