clang: include/clang/Basic/Specifiers.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_CLANG_BASIC_SPECIFIERS_H
16#define LLVM_CLANG_BASIC_SPECIFIERS_H
17
18#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/DataTypes.h"
20#include "llvm/Support/ErrorHandling.h"
21
22namespace llvm {
23class raw_ostream;
24}
26
27
32 };
33
34
36
37
38
44 };
45
46
48
49
51
53
54
90#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) TST_##Trait,
91#include "clang/Basic/TransformTypeTraits.def"
98#define GENERIC_IMAGE_TYPE(ImgType, Id) \
99 TST_##ImgType##_t,
100#include "clang/Basic/OpenCLImageTypes.def"
101#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
102 TST_##Name,
103#include "clang/Basic/HLSLIntangibleTypes.def"
106
107
108
110 static_assert(TST_error < 1 << 7, "Type bitfield not wide enough for TST");
117 LLVM_PREFERRED_TYPE(bool)
119 };
120
121
122
129
130
131
133
134
136
137
138
140
141
142
143
146
147
148
150
152
153
155
156
158
159
160
162
163
164
165
167
168
171
172
174
176
178
179
181
182
184 };
185
186
187
189
190
192
193
195
196
197
199
200
201
203
204
205
208
209
210
211
214 }
215
216
217
218
221 switch (Kind) {
225 return true;
226
229 return false;
230 }
231 llvm_unreachable("bad template specialization kind");
232 }
233
234
237
239
240
242
243
246
247
249
254
255
259
260
263 }
264
265
267 return true;
268 }
269
270
276
277
303 };
304
305
306
308 switch (CC) {
320 return false;
321 default:
322 return true;
323 }
324 }
325
326
332 SD_Dynamic
334
335
337
339
341
342
343
344
346
347
348
349
351 };
352
354
355
356
358 return uint8_t(L) > uint8_t(R);
359 }
360
361
363 bool isContextSensitive = false);
364
365
367
369
370
371
373
374
375
376
378
379
380
381
383
384
385
386
388
389
391
392
394 };
395
396
397
403 };
404
406
408 switch (AS) {
410 return "public";
412 return "protected";
414 return "private";
416 return {};
417 }
418 llvm_unreachable("Unknown AccessSpecifier");
419 }
420}
421
422#endif
enum clang::sema::@1727::IndirectLocalPathEntry::EntryKind Kind
The base class of the type hierarchy.
The JSON file list parser is used to communicate input to InstallAPI.
TypeSpecifierType
Specifies the kind of type.
@ TST_typename_pack_indexing
bool isTemplateInstantiation(TemplateSpecializationKind Kind)
Determine whether this template specialization kind refers to an instantiation of an entity (as oppos...
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
llvm::StringRef getParameterABISpelling(ParameterABI kind)
ConstexprSpecKind
Define the kind of constexpr specifier.
IfStatementKind
In an if statement, this denotes whether the statement is a constexpr or consteval if statement.
NullabilityKind
Describes the nullability of a particular type.
@ Nullable
Values of this type can be null.
@ NonNull
Values of this type can never be null.
InClassInitStyle
In-class initialization styles for non-static data members.
@ ICIS_CopyInit
Copy initialization.
@ ICIS_ListInit
Direct list-initialization.
@ ICIS_NoInit
No in-class initializer.
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
@ OK_VectorComponent
A vector component is an element or range of elements on a vector.
@ OK_ObjCProperty
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
@ OK_ObjCSubscript
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
@ OK_Ordinary
An ordinary object is located at an address in memory.
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
@ OK_MatrixComponent
A matrix component is a single element of a matrix.
StorageClass
Storage classes.
ThreadStorageClassSpecifier
Thread storage-class-specifier.
@ TSCS_thread_local
C++11 thread_local.
@ TSCS__Thread_local
C11 _Thread_local.
@ TSCS___thread
GNU __thread.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
@ SD_Thread
Thread storage duration.
@ SD_Static
Static storage duration.
@ SD_FullExpression
Full-expression storage duration (for temporaries).
@ SD_Automatic
Automatic storage duration (most local variables).
@ SD_Dynamic
Dynamic storage duration.
llvm::StringRef getNullabilitySpelling(NullabilityKind kind, bool isContextSensitive=false)
Retrieve the spelling of the given nullability kind.
ParameterABI
Kinds of parameter ABI.
@ SwiftAsyncContext
This parameter (which must have pointer type) uses the special Swift asynchronous context-pointer ABI...
@ SwiftErrorResult
This parameter (which must have pointer-to-pointer type) uses the special Swift error-result ABI trea...
@ SwiftIndirectResult
This parameter (which must have pointer type) is a Swift indirect result parameter.
@ SwiftContext
This parameter (which must have pointer type) uses the special Swift context-pointer ABI treatment.
bool supportsVariadicCall(CallingConv CC)
Checks whether the given calling convention supports variadic calls.
bool hasWeakerNullability(NullabilityKind L, NullabilityKind R)
Return true if L has a weaker nullability annotation than R.
bool isLegalForFunction(StorageClass SC)
Checks whether the given storage class is legal for functions.
TypeSpecifierWidth
Specifies the width of a type, e.g., short, long, or long long.
TypeSpecifierSign
Specifies the signedness of a type, e.g., signed or unsigned.
bool isLegalForVariable(StorageClass SC)
Checks whether the given storage class is legal for variables.
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
ExplicitSpecKind
Define the meaning of possible values of the kind in ExplicitSpecifier.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
@ TSK_ExplicitSpecialization
This template specialization was declared or defined by an explicit specialization (C++ [temp....
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
@ TSK_Undeclared
This template specialization was formed from a template-id but has not yet been declared,...
CallingConv
CallingConv - Specifies the calling convention that a function uses.
bool isTemplateExplicitInstantiationOrSpecialization(TemplateSpecializationKind Kind)
True if this template specialization kind is an explicit specialization, explicit instantiation decla...
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
NonOdrUseReason
The reason why a DeclRefExpr does not constitute an odr-use.
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
@ NOUR_None
This is an odr-use.
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
Diagnostic wrappers for TextAPI types for error reporting.
Structure that packs information about the type specifiers that were written in a particular type spe...