clang 17.0.0git
ASTCommon.cpp
Go to the documentation of this file.
1//===--- ASTCommon.cpp - Common stuff for ASTReader/ASTWriter----*- 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 common functions that both ASTReader and ASTWriter use.
10//
11//===----------------------------------------------------------------------===//
12
13#include "ASTCommon.h"
14#include "clang/AST/DeclCXX.h"
15#include "clang/AST/DeclObjC.h"
18#include "llvm/Support/DJB.h"
19
20using namespace clang;
21
22// Give ASTDeserializationListener's VTable a home.
24
27 unsigned ID = 0;
28 switch (BT->getKind()) {
29 case BuiltinType::Void:
31 break;
32 case BuiltinType::Bool:
34 break;
35 case BuiltinType::Char_U:
37 break;
38 case BuiltinType::UChar:
40 break;
41 case BuiltinType::UShort:
43 break;
44 case BuiltinType::UInt:
46 break;
47 case BuiltinType::ULong:
49 break;
50 case BuiltinType::ULongLong:
52 break;
53 case BuiltinType::UInt128:
55 break;
56 case BuiltinType::Char_S:
58 break;
59 case BuiltinType::SChar:
61 break;
62 case BuiltinType::WChar_S:
63 case BuiltinType::WChar_U:
65 break;
66 case BuiltinType::Short:
68 break;
69 case BuiltinType::Int:
71 break;
72 case BuiltinType::Long:
74 break;
75 case BuiltinType::LongLong:
77 break;
78 case BuiltinType::Int128:
80 break;
81 case BuiltinType::Half:
83 break;
84 case BuiltinType::Float:
86 break;
87 case BuiltinType::Double:
89 break;
90 case BuiltinType::LongDouble:
92 break;
93 case BuiltinType::ShortAccum:
95 break;
96 case BuiltinType::Accum:
98 break;
99 case BuiltinType::LongAccum:
101 break;
102 case BuiltinType::UShortAccum:
104 break;
105 case BuiltinType::UAccum:
107 break;
108 case BuiltinType::ULongAccum:
110 break;
111 case BuiltinType::ShortFract:
113 break;
114 case BuiltinType::Fract:
116 break;
117 case BuiltinType::LongFract:
119 break;
120 case BuiltinType::UShortFract:
122 break;
123 case BuiltinType::UFract:
125 break;
126 case BuiltinType::ULongFract:
128 break;
129 case BuiltinType::SatShortAccum:
131 break;
132 case BuiltinType::SatAccum:
134 break;
135 case BuiltinType::SatLongAccum:
137 break;
138 case BuiltinType::SatUShortAccum:
140 break;
141 case BuiltinType::SatUAccum:
143 break;
144 case BuiltinType::SatULongAccum:
146 break;
147 case BuiltinType::SatShortFract:
149 break;
150 case BuiltinType::SatFract:
152 break;
153 case BuiltinType::SatLongFract:
155 break;
156 case BuiltinType::SatUShortFract:
158 break;
159 case BuiltinType::SatUFract:
161 break;
162 case BuiltinType::SatULongFract:
164 break;
165 case BuiltinType::Float16:
167 break;
168 case BuiltinType::Float128:
170 break;
171 case BuiltinType::Ibm128:
173 break;
174 case BuiltinType::NullPtr:
176 break;
177 case BuiltinType::Char8:
179 break;
180 case BuiltinType::Char16:
182 break;
183 case BuiltinType::Char32:
185 break;
186 case BuiltinType::Overload:
188 break;
189 case BuiltinType::BoundMember:
191 break;
192 case BuiltinType::PseudoObject:
194 break;
195 case BuiltinType::Dependent:
197 break;
198 case BuiltinType::UnknownAny:
200 break;
201 case BuiltinType::ARCUnbridgedCast:
203 break;
204 case BuiltinType::ObjCId:
206 break;
207 case BuiltinType::ObjCClass:
209 break;
210 case BuiltinType::ObjCSel:
212 break;
213#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
214 case BuiltinType::Id: \
215 ID = PREDEF_TYPE_##Id##_ID; \
216 break;
217#include "clang/Basic/OpenCLImageTypes.def"
218#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
219 case BuiltinType::Id: \
220 ID = PREDEF_TYPE_##Id##_ID; \
221 break;
222#include "clang/Basic/OpenCLExtensionTypes.def"
223 case BuiltinType::OCLSampler:
225 break;
226 case BuiltinType::OCLEvent:
228 break;
229 case BuiltinType::OCLClkEvent:
231 break;
232 case BuiltinType::OCLQueue:
234 break;
235 case BuiltinType::OCLReserveID:
237 break;
238#define SVE_TYPE(Name, Id, SingletonId) \
239 case BuiltinType::Id: \
240 ID = PREDEF_TYPE_##Id##_ID; \
241 break;
242#include "clang/Basic/AArch64SVEACLETypes.def"
243#define PPC_VECTOR_TYPE(Name, Id, Size) \
244 case BuiltinType::Id: \
245 ID = PREDEF_TYPE_##Id##_ID; \
246 break;
247#include "clang/Basic/PPCTypes.def"
248#define RVV_TYPE(Name, Id, SingletonId) \
249 case BuiltinType::Id: \
250 ID = PREDEF_TYPE_##Id##_ID; \
251 break;
252#include "clang/Basic/RISCVVTypes.def"
253#define WASM_TYPE(Name, Id, SingletonId) \
254 case BuiltinType::Id: \
255 ID = PREDEF_TYPE_##Id##_ID; \
256 break;
257#include "clang/Basic/WebAssemblyReferenceTypes.def"
258 case BuiltinType::BuiltinFn:
260 break;
261 case BuiltinType::IncompleteMatrixIdx:
263 break;
264 case BuiltinType::OMPArraySection:
266 break;
267 case BuiltinType::OMPArrayShaping:
269 break;
270 case BuiltinType::OMPIterator:
272 break;
273 case BuiltinType::BFloat16:
275 break;
276 }
277
278 return TypeIdx(ID);
279}
280
282 unsigned N = Sel.getNumArgs();
283 if (N == 0)
284 ++N;
285 unsigned R = 5381;
286 for (unsigned I = 0; I != N; ++I)
288 R = llvm::djbHash(II->getName(), R);
289 return R;
290}
291
292const DeclContext *
294 switch (DC->getDeclKind()) {
295 // These entities may have multiple definitions.
296 case Decl::TranslationUnit:
297 case Decl::ExternCContext:
298 case Decl::Namespace:
299 case Decl::LinkageSpec:
300 case Decl::Export:
301 return nullptr;
302
303 // C/C++ tag types can only be defined in one place.
304 case Decl::Enum:
305 case Decl::Record:
306 if (const TagDecl *Def = cast<TagDecl>(DC)->getDefinition())
307 return Def;
308 return nullptr;
309
310 // FIXME: These can be defined in one place... except special member
311 // functions and out-of-line definitions.
312 case Decl::CXXRecord:
313 case Decl::ClassTemplateSpecialization:
314 case Decl::ClassTemplatePartialSpecialization:
315 return nullptr;
316
317 // Each function, method, and block declaration is its own DeclContext.
318 case Decl::Function:
319 case Decl::CXXMethod:
320 case Decl::CXXConstructor:
321 case Decl::CXXDestructor:
322 case Decl::CXXConversion:
323 case Decl::ObjCMethod:
324 case Decl::Block:
325 case Decl::Captured:
326 // Objective C categories, category implementations, and class
327 // implementations can only be defined in one place.
328 case Decl::ObjCCategory:
329 case Decl::ObjCCategoryImpl:
330 case Decl::ObjCImplementation:
331 return DC;
332
333 case Decl::ObjCProtocol:
334 if (const ObjCProtocolDecl *Def
335 = cast<ObjCProtocolDecl>(DC)->getDefinition())
336 return Def;
337 return nullptr;
338
339 // FIXME: These are defined in one place, but properties in class extensions
340 // end up being back-patched into the main interface. See
341 // Sema::HandlePropertyInClassExtension for the offending code.
342 case Decl::ObjCInterface:
343 return nullptr;
344
345 default:
346 llvm_unreachable("Unhandled DeclContext in AST reader");
347 }
348
349 llvm_unreachable("Unhandled decl kind");
350}
351
353 switch (static_cast<Decl::Kind>(Kind)) {
354 case Decl::TranslationUnit:
355 case Decl::ExternCContext:
356 // Special case of a "merged" declaration.
357 return true;
358
359 case Decl::Namespace:
360 case Decl::NamespaceAlias:
361 case Decl::Typedef:
362 case Decl::TypeAlias:
363 case Decl::Enum:
364 case Decl::Record:
365 case Decl::CXXRecord:
366 case Decl::ClassTemplateSpecialization:
367 case Decl::ClassTemplatePartialSpecialization:
368 case Decl::VarTemplateSpecialization:
369 case Decl::VarTemplatePartialSpecialization:
370 case Decl::Function:
371 case Decl::CXXDeductionGuide:
372 case Decl::CXXMethod:
373 case Decl::CXXConstructor:
374 case Decl::CXXDestructor:
375 case Decl::CXXConversion:
376 case Decl::UsingShadow:
377 case Decl::ConstructorUsingShadow:
378 case Decl::Var:
379 case Decl::FunctionTemplate:
380 case Decl::ClassTemplate:
381 case Decl::VarTemplate:
382 case Decl::TypeAliasTemplate:
383 case Decl::ObjCProtocol:
384 case Decl::ObjCInterface:
385 case Decl::Empty:
386 return true;
387
388 // Never redeclarable.
389 case Decl::UsingDirective:
390 case Decl::Label:
391 case Decl::UnresolvedUsingTypename:
392 case Decl::TemplateTypeParm:
393 case Decl::EnumConstant:
394 case Decl::UnresolvedUsingValue:
395 case Decl::IndirectField:
396 case Decl::Field:
397 case Decl::MSProperty:
398 case Decl::MSGuid:
399 case Decl::UnnamedGlobalConstant:
400 case Decl::TemplateParamObject:
401 case Decl::ObjCIvar:
402 case Decl::ObjCAtDefsField:
403 case Decl::NonTypeTemplateParm:
404 case Decl::TemplateTemplateParm:
405 case Decl::Using:
406 case Decl::UsingEnum:
407 case Decl::UsingPack:
408 case Decl::ObjCMethod:
409 case Decl::ObjCCategory:
410 case Decl::ObjCCategoryImpl:
411 case Decl::ObjCImplementation:
412 case Decl::ObjCProperty:
413 case Decl::ObjCCompatibleAlias:
414 case Decl::LinkageSpec:
415 case Decl::Export:
416 case Decl::ObjCPropertyImpl:
417 case Decl::PragmaComment:
418 case Decl::PragmaDetectMismatch:
419 case Decl::FileScopeAsm:
420 case Decl::TopLevelStmt:
421 case Decl::AccessSpec:
422 case Decl::Friend:
423 case Decl::FriendTemplate:
424 case Decl::StaticAssert:
425 case Decl::Block:
426 case Decl::Captured:
427 case Decl::ClassScopeFunctionSpecialization:
428 case Decl::Import:
429 case Decl::OMPThreadPrivate:
430 case Decl::OMPAllocate:
431 case Decl::OMPRequires:
432 case Decl::OMPCapturedExpr:
433 case Decl::OMPDeclareReduction:
434 case Decl::OMPDeclareMapper:
435 case Decl::BuiltinTemplate:
436 case Decl::Decomposition:
437 case Decl::Binding:
438 case Decl::Concept:
439 case Decl::ImplicitConceptSpecialization:
440 case Decl::LifetimeExtendedTemporary:
441 case Decl::RequiresExprBody:
442 case Decl::UnresolvedUsingIfExists:
443 case Decl::HLSLBuffer:
444 return false;
445
446 // These indirectly derive from Redeclarable<T> but are not actually
447 // redeclarable.
448 case Decl::ImplicitParam:
449 case Decl::ParmVar:
450 case Decl::ObjCTypeParam:
451 return false;
452 }
453
454 llvm_unreachable("Unhandled declaration kind");
455}
456
458 // Friend declarations in dependent contexts aren't anonymous in the usual
459 // sense, but they cannot be found by name lookup in their semantic context
460 // (or indeed in any context), so we treat them as anonymous.
461 //
462 // This doesn't apply to friend tag decls; Sema makes those available to name
463 // lookup in the surrounding context.
464 if (D->getFriendObjectKind() &&
465 D->getLexicalDeclContext()->isDependentContext() && !isa<TagDecl>(D)) {
466 // For function templates and class templates, the template is numbered and
467 // not its pattern.
468 if (auto *FD = dyn_cast<FunctionDecl>(D))
469 return !FD->getDescribedFunctionTemplate();
470 if (auto *RD = dyn_cast<CXXRecordDecl>(D))
471 return !RD->getDescribedClassTemplate();
472 return true;
473 }
474
475 // At block scope, we number everything that we need to deduplicate, since we
476 // can't just use name matching to keep things lined up.
477 // FIXME: This is only necessary for an inline function or a template or
478 // similar.
480 if (auto *VD = dyn_cast<VarDecl>(D))
481 return VD->isStaticLocal();
482 // FIXME: What about CapturedDecls (and declarations nested within them)?
483 return isa<TagDecl, BlockDecl>(D);
484 }
485
486 // Otherwise, we only care about anonymous class members / block-scope decls.
487 // FIXME: We need to handle blocks within inline / templated variables too.
488 if (D->getDeclName())
489 return false;
490 if (!isa<RecordDecl, ObjCInterfaceDecl>(D->getLexicalDeclContext()))
491 return false;
492 return isa<TagDecl, FieldDecl>(D);
493}
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
static const NamedDecl * getDefinition(const Decl *D)
Definition: SemaDecl.cpp:2984
This class is used for builtin types like 'int'.
Definition: Type.h:2646
Kind getKind() const
Definition: Type.h:2684
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1402
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
Definition: DeclBase.cpp:1209
bool isFunctionOrMethod() const
Definition: DeclBase.h:1994
Decl::Kind getDeclKind() const
Definition: DeclBase.h:1935
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so,...
Definition: DeclBase.h:1194
Kind
Lists the kind of concrete classes of Decl.
Definition: DeclBase.h:86
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition: DeclBase.h:886
One of these records is kept for each identifier that is lexed.
This represents a decl that may have a name.
Definition: Decl.h:247
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:313
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2069
Smart pointer class that efficiently represents Objective-C method names.
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
unsigned getNumArgs() const
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3454
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:88
@ PREDEF_TYPE_LONG_ACCUM_ID
The 'long _Accum' type.
Definition: ASTBitCodes.h:1003
@ PREDEF_TYPE_SAMPLER_ID
OpenCL sampler type.
Definition: ASTBitCodes.h:976
@ PREDEF_TYPE_INT128_ID
The '__int128_t' type.
Definition: ASTBitCodes.h:925
@ PREDEF_TYPE_CHAR32_ID
The C++ 'char32_t' type.
Definition: ASTBitCodes.h:934
@ PREDEF_TYPE_SAT_SHORT_ACCUM_ID
The '_Sat short _Accum' type.
Definition: ASTBitCodes.h:1033
@ PREDEF_TYPE_IBM128_ID
The '__ibm128' type.
Definition: ASTBitCodes.h:1081
@ PREDEF_TYPE_SHORT_FRACT_ID
The 'short _Fract' type.
Definition: ASTBitCodes.h:1015
@ PREDEF_TYPE_BOUND_MEMBER
The placeholder type for bound member functions.
Definition: ASTBitCodes.h:949
@ PREDEF_TYPE_LONGLONG_ID
The (signed) 'long long' type.
Definition: ASTBitCodes.h:904
@ PREDEF_TYPE_FRACT_ID
The '_Fract' type.
Definition: ASTBitCodes.h:1018
@ PREDEF_TYPE_ARC_UNBRIDGED_CAST
ARC's unbridged-cast placeholder type.
Definition: ASTBitCodes.h:961
@ PREDEF_TYPE_USHORT_FRACT_ID
The 'unsigned short _Fract' type.
Definition: ASTBitCodes.h:1024
@ PREDEF_TYPE_SAT_ULONG_FRACT_ID
The '_Sat unsigned long _Fract' type.
Definition: ASTBitCodes.h:1066
@ PREDEF_TYPE_BOOL_ID
The 'bool' or '_Bool' type.
Definition: ASTBitCodes.h:865
@ PREDEF_TYPE_SAT_LONG_ACCUM_ID
The '_Sat long _Accum' type.
Definition: ASTBitCodes.h:1039
@ PREDEF_TYPE_SAT_LONG_FRACT_ID
The '_Sat long _Fract' type.
Definition: ASTBitCodes.h:1057
@ PREDEF_TYPE_SAT_SHORT_FRACT_ID
The '_Sat short _Fract' type.
Definition: ASTBitCodes.h:1051
@ PREDEF_TYPE_CHAR_U_ID
The 'char' type, when it is unsigned.
Definition: ASTBitCodes.h:868
@ PREDEF_TYPE_RESERVE_ID_ID
OpenCL reserve_id type.
Definition: ASTBitCodes.h:982
@ PREDEF_TYPE_SAT_ACCUM_ID
The '_Sat _Accum' type.
Definition: ASTBitCodes.h:1036
@ PREDEF_TYPE_BUILTIN_FN
The placeholder type for builtin functions.
Definition: ASTBitCodes.h:967
@ PREDEF_TYPE_SHORT_ACCUM_ID
The 'short _Accum' type.
Definition: ASTBitCodes.h:997
@ PREDEF_TYPE_FLOAT_ID
The 'float' type.
Definition: ASTBitCodes.h:907
@ PREDEF_TYPE_QUEUE_ID
OpenCL queue type.
Definition: ASTBitCodes.h:979
@ PREDEF_TYPE_INT_ID
The (signed) 'int' type.
Definition: ASTBitCodes.h:898
@ PREDEF_TYPE_OBJC_SEL
The ObjC 'SEL' type.
Definition: ASTBitCodes.h:943
@ PREDEF_TYPE_BFLOAT16_ID
The '__bf16' type.
Definition: ASTBitCodes.h:1078
@ PREDEF_TYPE_WCHAR_ID
The C++ 'wchar_t' type.
Definition: ASTBitCodes.h:892
@ PREDEF_TYPE_UCHAR_ID
The 'unsigned char' type.
Definition: ASTBitCodes.h:871
@ PREDEF_TYPE_UACCUM_ID
The 'unsigned _Accum' type.
Definition: ASTBitCodes.h:1009
@ PREDEF_TYPE_SCHAR_ID
The 'signed char' type.
Definition: ASTBitCodes.h:889
@ PREDEF_TYPE_CHAR_S_ID
The 'char' type, when it is signed.
Definition: ASTBitCodes.h:886
@ PREDEF_TYPE_NULLPTR_ID
The type of 'nullptr'.
Definition: ASTBitCodes.h:928
@ PREDEF_TYPE_ULONG_FRACT_ID
The 'unsigned long _Fract' type.
Definition: ASTBitCodes.h:1030
@ PREDEF_TYPE_FLOAT16_ID
The '_Float16' type.
Definition: ASTBitCodes.h:991
@ PREDEF_TYPE_UINT_ID
The 'unsigned int' type.
Definition: ASTBitCodes.h:877
@ PREDEF_TYPE_OMP_ARRAY_SECTION
The placeholder type for OpenMP array section.
Definition: ASTBitCodes.h:985
@ PREDEF_TYPE_FLOAT128_ID
The '__float128' type.
Definition: ASTBitCodes.h:988
@ PREDEF_TYPE_OBJC_ID
The ObjC 'id' type.
Definition: ASTBitCodes.h:937
@ PREDEF_TYPE_CHAR16_ID
The C++ 'char16_t' type.
Definition: ASTBitCodes.h:931
@ PREDEF_TYPE_ULONGLONG_ID
The 'unsigned long long' type.
Definition: ASTBitCodes.h:883
@ PREDEF_TYPE_SAT_UFRACT_ID
The '_Sat unsigned _Fract' type.
Definition: ASTBitCodes.h:1063
@ PREDEF_TYPE_USHORT_ID
The 'unsigned short' type.
Definition: ASTBitCodes.h:874
@ PREDEF_TYPE_SHORT_ID
The (signed) 'short' type.
Definition: ASTBitCodes.h:895
@ PREDEF_TYPE_OMP_ARRAY_SHAPING
The placeholder type for OpenMP array shaping operation.
Definition: ASTBitCodes.h:1069
@ PREDEF_TYPE_DEPENDENT_ID
The placeholder type for dependent types.
Definition: ASTBitCodes.h:919
@ PREDEF_TYPE_LONGDOUBLE_ID
The 'long double' type.
Definition: ASTBitCodes.h:913
@ PREDEF_TYPE_DOUBLE_ID
The 'double' type.
Definition: ASTBitCodes.h:910
@ PREDEF_TYPE_UINT128_ID
The '__uint128_t' type.
Definition: ASTBitCodes.h:922
@ PREDEF_TYPE_HALF_ID
The OpenCL 'half' / ARM NEON __fp16 type.
Definition: ASTBitCodes.h:958
@ PREDEF_TYPE_VOID_ID
The void type.
Definition: ASTBitCodes.h:862
@ PREDEF_TYPE_SAT_USHORT_FRACT_ID
The '_Sat unsigned short _Fract' type.
Definition: ASTBitCodes.h:1060
@ PREDEF_TYPE_ACCUM_ID
The '_Accum' type.
Definition: ASTBitCodes.h:1000
@ PREDEF_TYPE_SAT_FRACT_ID
The '_Sat _Fract' type.
Definition: ASTBitCodes.h:1054
@ PREDEF_TYPE_USHORT_ACCUM_ID
The 'unsigned short _Accum' type.
Definition: ASTBitCodes.h:1006
@ PREDEF_TYPE_CHAR8_ID
The C++ 'char8_t' type.
Definition: ASTBitCodes.h:994
@ PREDEF_TYPE_UFRACT_ID
The 'unsigned _Fract' type.
Definition: ASTBitCodes.h:1027
@ PREDEF_TYPE_OVERLOAD_ID
The placeholder type for overloaded function sets.
Definition: ASTBitCodes.h:916
@ PREDEF_TYPE_INCOMPLETE_MATRIX_IDX
A placeholder type for incomplete matrix index operations.
Definition: ASTBitCodes.h:1075
@ PREDEF_TYPE_SAT_USHORT_ACCUM_ID
The '_Sat unsigned short _Accum' type.
Definition: ASTBitCodes.h:1042
@ PREDEF_TYPE_LONG_ID
The (signed) 'long' type.
Definition: ASTBitCodes.h:901
@ PREDEF_TYPE_SAT_ULONG_ACCUM_ID
The '_Sat unsigned long _Accum' type.
Definition: ASTBitCodes.h:1048
@ PREDEF_TYPE_LONG_FRACT_ID
The 'long _Fract' type.
Definition: ASTBitCodes.h:1021
@ PREDEF_TYPE_UNKNOWN_ANY
The 'unknown any' placeholder type.
Definition: ASTBitCodes.h:946
@ PREDEF_TYPE_OMP_ITERATOR
The placeholder type for OpenMP iterator expression.
Definition: ASTBitCodes.h:1072
@ PREDEF_TYPE_PSEUDO_OBJECT
The pseudo-object placeholder type.
Definition: ASTBitCodes.h:964
@ PREDEF_TYPE_OBJC_CLASS
The ObjC 'Class' type.
Definition: ASTBitCodes.h:940
@ PREDEF_TYPE_ULONG_ID
The 'unsigned long' type.
Definition: ASTBitCodes.h:880
@ PREDEF_TYPE_SAT_UACCUM_ID
The '_Sat unsigned _Accum' type.
Definition: ASTBitCodes.h:1045
@ PREDEF_TYPE_CLK_EVENT_ID
OpenCL clk event type.
Definition: ASTBitCodes.h:973
@ PREDEF_TYPE_EVENT_ID
OpenCL event type.
Definition: ASTBitCodes.h:970
@ PREDEF_TYPE_ULONG_ACCUM_ID
The 'unsigned long _Accum' type.
Definition: ASTBitCodes.h:1012
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
Definition: ASTCommon.cpp:352
TypeIdx TypeIdxFromBuiltin(const BuiltinType *BT)
Definition: ASTCommon.cpp:26
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
Definition: ASTCommon.cpp:457
const DeclContext * getDefinitiveDeclContext(const DeclContext *DC)
Retrieve the "definitive" declaration that provides all of the visible entries for the given declarat...
Definition: ASTCommon.cpp:293
unsigned ComputeHash(Selector Sel)
Definition: ASTCommon.cpp:281