clang  13.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 
20 using 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::NullPtr:
173  break;
174  case BuiltinType::Char8:
176  break;
177  case BuiltinType::Char16:
179  break;
180  case BuiltinType::Char32:
182  break;
183  case BuiltinType::Overload:
185  break;
186  case BuiltinType::BoundMember:
188  break;
189  case BuiltinType::PseudoObject:
191  break;
192  case BuiltinType::Dependent:
194  break;
195  case BuiltinType::UnknownAny:
197  break;
198  case BuiltinType::ARCUnbridgedCast:
200  break;
201  case BuiltinType::ObjCId:
203  break;
204  case BuiltinType::ObjCClass:
206  break;
207  case BuiltinType::ObjCSel:
209  break;
210 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
211  case BuiltinType::Id: \
212  ID = PREDEF_TYPE_##Id##_ID; \
213  break;
214 #include "clang/Basic/OpenCLImageTypes.def"
215 #define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
216  case BuiltinType::Id: \
217  ID = PREDEF_TYPE_##Id##_ID; \
218  break;
219 #include "clang/Basic/OpenCLExtensionTypes.def"
220  case BuiltinType::OCLSampler:
222  break;
223  case BuiltinType::OCLEvent:
225  break;
226  case BuiltinType::OCLClkEvent:
228  break;
229  case BuiltinType::OCLQueue:
231  break;
232  case BuiltinType::OCLReserveID:
234  break;
235 #define SVE_TYPE(Name, Id, SingletonId) \
236  case BuiltinType::Id: \
237  ID = PREDEF_TYPE_##Id##_ID; \
238  break;
239 #include "clang/Basic/AArch64SVEACLETypes.def"
240 #define PPC_VECTOR_TYPE(Name, Id, Size) \
241  case BuiltinType::Id: \
242  ID = PREDEF_TYPE_##Id##_ID; \
243  break;
244 #include "clang/Basic/PPCTypes.def"
245 #define RVV_TYPE(Name, Id, SingletonId) \
246  case BuiltinType::Id: \
247  ID = PREDEF_TYPE_##Id##_ID; \
248  break;
249 #include "clang/Basic/RISCVVTypes.def"
250  case BuiltinType::BuiltinFn:
252  break;
253  case BuiltinType::IncompleteMatrixIdx:
255  break;
256  case BuiltinType::OMPArraySection:
258  break;
259  case BuiltinType::OMPArrayShaping:
261  break;
262  case BuiltinType::OMPIterator:
264  break;
265  case BuiltinType::BFloat16:
267  break;
268  }
269 
270  return TypeIdx(ID);
271 }
272 
274  unsigned N = Sel.getNumArgs();
275  if (N == 0)
276  ++N;
277  unsigned R = 5381;
278  for (unsigned I = 0; I != N; ++I)
279  if (IdentifierInfo *II = Sel.getIdentifierInfoForSlot(I))
280  R = llvm::djbHash(II->getName(), R);
281  return R;
282 }
283 
284 const DeclContext *
286  switch (DC->getDeclKind()) {
287  // These entities may have multiple definitions.
288  case Decl::TranslationUnit:
289  case Decl::ExternCContext:
290  case Decl::Namespace:
291  case Decl::LinkageSpec:
292  case Decl::Export:
293  return nullptr;
294 
295  // C/C++ tag types can only be defined in one place.
296  case Decl::Enum:
297  case Decl::Record:
298  if (const TagDecl *Def = cast<TagDecl>(DC)->getDefinition())
299  return Def;
300  return nullptr;
301 
302  // FIXME: These can be defined in one place... except special member
303  // functions and out-of-line definitions.
304  case Decl::CXXRecord:
305  case Decl::ClassTemplateSpecialization:
306  case Decl::ClassTemplatePartialSpecialization:
307  return nullptr;
308 
309  // Each function, method, and block declaration is its own DeclContext.
310  case Decl::Function:
311  case Decl::CXXMethod:
312  case Decl::CXXConstructor:
313  case Decl::CXXDestructor:
314  case Decl::CXXConversion:
315  case Decl::ObjCMethod:
316  case Decl::Block:
317  case Decl::Captured:
318  // Objective C categories, category implementations, and class
319  // implementations can only be defined in one place.
320  case Decl::ObjCCategory:
321  case Decl::ObjCCategoryImpl:
322  case Decl::ObjCImplementation:
323  return DC;
324 
325  case Decl::ObjCProtocol:
326  if (const ObjCProtocolDecl *Def
327  = cast<ObjCProtocolDecl>(DC)->getDefinition())
328  return Def;
329  return nullptr;
330 
331  // FIXME: These are defined in one place, but properties in class extensions
332  // end up being back-patched into the main interface. See
333  // Sema::HandlePropertyInClassExtension for the offending code.
334  case Decl::ObjCInterface:
335  return nullptr;
336 
337  default:
338  llvm_unreachable("Unhandled DeclContext in AST reader");
339  }
340 
341  llvm_unreachable("Unhandled decl kind");
342 }
343 
345  switch (static_cast<Decl::Kind>(Kind)) {
346  case Decl::TranslationUnit:
347  case Decl::ExternCContext:
348  // Special case of a "merged" declaration.
349  return true;
350 
351  case Decl::Namespace:
352  case Decl::NamespaceAlias:
353  case Decl::Typedef:
354  case Decl::TypeAlias:
355  case Decl::Enum:
356  case Decl::Record:
357  case Decl::CXXRecord:
358  case Decl::ClassTemplateSpecialization:
359  case Decl::ClassTemplatePartialSpecialization:
360  case Decl::VarTemplateSpecialization:
361  case Decl::VarTemplatePartialSpecialization:
362  case Decl::Function:
363  case Decl::CXXDeductionGuide:
364  case Decl::CXXMethod:
365  case Decl::CXXConstructor:
366  case Decl::CXXDestructor:
367  case Decl::CXXConversion:
368  case Decl::UsingShadow:
369  case Decl::ConstructorUsingShadow:
370  case Decl::Var:
371  case Decl::FunctionTemplate:
372  case Decl::ClassTemplate:
373  case Decl::VarTemplate:
374  case Decl::TypeAliasTemplate:
375  case Decl::ObjCProtocol:
376  case Decl::ObjCInterface:
377  case Decl::Empty:
378  return true;
379 
380  // Never redeclarable.
381  case Decl::UsingDirective:
382  case Decl::Label:
383  case Decl::UnresolvedUsingTypename:
384  case Decl::TemplateTypeParm:
385  case Decl::EnumConstant:
386  case Decl::UnresolvedUsingValue:
387  case Decl::IndirectField:
388  case Decl::Field:
389  case Decl::MSProperty:
390  case Decl::MSGuid:
391  case Decl::TemplateParamObject:
392  case Decl::ObjCIvar:
393  case Decl::ObjCAtDefsField:
394  case Decl::NonTypeTemplateParm:
395  case Decl::TemplateTemplateParm:
396  case Decl::Using:
397  case Decl::UsingPack:
398  case Decl::ObjCMethod:
399  case Decl::ObjCCategory:
400  case Decl::ObjCCategoryImpl:
401  case Decl::ObjCImplementation:
402  case Decl::ObjCProperty:
403  case Decl::ObjCCompatibleAlias:
404  case Decl::LinkageSpec:
405  case Decl::Export:
406  case Decl::ObjCPropertyImpl:
407  case Decl::PragmaComment:
408  case Decl::PragmaDetectMismatch:
409  case Decl::FileScopeAsm:
410  case Decl::AccessSpec:
411  case Decl::Friend:
412  case Decl::FriendTemplate:
413  case Decl::StaticAssert:
414  case Decl::Block:
415  case Decl::Captured:
416  case Decl::ClassScopeFunctionSpecialization:
417  case Decl::Import:
418  case Decl::OMPThreadPrivate:
419  case Decl::OMPAllocate:
420  case Decl::OMPRequires:
421  case Decl::OMPCapturedExpr:
422  case Decl::OMPDeclareReduction:
423  case Decl::OMPDeclareMapper:
424  case Decl::BuiltinTemplate:
425  case Decl::Decomposition:
426  case Decl::Binding:
427  case Decl::Concept:
428  case Decl::LifetimeExtendedTemporary:
429  case Decl::RequiresExprBody:
430  return false;
431 
432  // These indirectly derive from Redeclarable<T> but are not actually
433  // redeclarable.
434  case Decl::ImplicitParam:
435  case Decl::ParmVar:
436  case Decl::ObjCTypeParam:
437  return false;
438  }
439 
440  llvm_unreachable("Unhandled declaration kind");
441 }
442 
444  // Friend declarations in dependent contexts aren't anonymous in the usual
445  // sense, but they cannot be found by name lookup in their semantic context
446  // (or indeed in any context), so we treat them as anonymous.
447  //
448  // This doesn't apply to friend tag decls; Sema makes those available to name
449  // lookup in the surrounding context.
450  if (D->getFriendObjectKind() &&
451  D->getLexicalDeclContext()->isDependentContext() && !isa<TagDecl>(D)) {
452  // For function templates and class templates, the template is numbered and
453  // not its pattern.
454  if (auto *FD = dyn_cast<FunctionDecl>(D))
455  return !FD->getDescribedFunctionTemplate();
456  if (auto *RD = dyn_cast<CXXRecordDecl>(D))
457  return !RD->getDescribedClassTemplate();
458  return true;
459  }
460 
461  // At block scope, we number everything that we need to deduplicate, since we
462  // can't just use name matching to keep things lined up.
463  // FIXME: This is only necessary for an inline function or a template or
464  // similar.
466  if (auto *VD = dyn_cast<VarDecl>(D))
467  return VD->isStaticLocal();
468  // FIXME: What about CapturedDecls (and declarations nested within them)?
469  return isa<TagDecl>(D) || isa<BlockDecl>(D);
470  }
471 
472  // Otherwise, we only care about anonymous class members / block-scope decls.
473  // FIXME: We need to handle lambdas and blocks within inline / templated
474  // variables too.
475  if (D->getDeclName() || !isa<CXXRecordDecl>(D->getLexicalDeclContext()))
476  return false;
477  return isa<TagDecl>(D) || isa<FieldDecl>(D);
478 }
clang::BuiltinType
This class is used for builtin types like 'int'.
Definition: Type.h:2480
clang::serialization::PREDEF_TYPE_SHORT_FRACT_ID
@ PREDEF_TYPE_SHORT_FRACT_ID
The 'short _Fract' type.
Definition: ASTBitCodes.h:1002
clang::serialization::PREDEF_TYPE_UNKNOWN_ANY
@ PREDEF_TYPE_UNKNOWN_ANY
The 'unknown any' placeholder type.
Definition: ASTBitCodes.h:933
clang::serialization::PREDEF_TYPE_INT128_ID
@ PREDEF_TYPE_INT128_ID
The '__int128_t' type.
Definition: ASTBitCodes.h:912
clang::serialization::PREDEF_TYPE_LONG_ACCUM_ID
@ PREDEF_TYPE_LONG_ACCUM_ID
The 'long _Accum' type.
Definition: ASTBitCodes.h:990
clang::serialization::PREDEF_TYPE_SAT_USHORT_FRACT_ID
@ PREDEF_TYPE_SAT_USHORT_FRACT_ID
The '_Sat unsigned short _Fract' type.
Definition: ASTBitCodes.h:1047
clang::serialization::TypeIdx
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:88
clang::serialization::PREDEF_TYPE_INCOMPLETE_MATRIX_IDX
@ PREDEF_TYPE_INCOMPLETE_MATRIX_IDX
A placeholder type for incomplete matrix index operations.
Definition: ASTBitCodes.h:1062
clang::serialization::PREDEF_TYPE_NULLPTR_ID
@ PREDEF_TYPE_NULLPTR_ID
The type of 'nullptr'.
Definition: ASTBitCodes.h:915
clang::serialization::PREDEF_TYPE_OMP_ARRAY_SECTION
@ PREDEF_TYPE_OMP_ARRAY_SECTION
The placeholder type for OpenMP array section.
Definition: ASTBitCodes.h:972
clang::serialization::PREDEF_TYPE_OBJC_SEL
@ PREDEF_TYPE_OBJC_SEL
The ObjC 'SEL' type.
Definition: ASTBitCodes.h:930
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1347
clang::serialization::PREDEF_TYPE_CHAR32_ID
@ PREDEF_TYPE_CHAR32_ID
The C++ 'char32_t' type.
Definition: ASTBitCodes.h:921
clang::serialization::PREDEF_TYPE_SAMPLER_ID
@ PREDEF_TYPE_SAMPLER_ID
OpenCL sampler type.
Definition: ASTBitCodes.h:963
clang::serialization::PREDEF_TYPE_ULONGLONG_ID
@ PREDEF_TYPE_ULONGLONG_ID
The 'unsigned long long' type.
Definition: ASTBitCodes.h:870
clang::serialization::PREDEF_TYPE_FLOAT16_ID
@ PREDEF_TYPE_FLOAT16_ID
The '_Float16' type.
Definition: ASTBitCodes.h:978
clang::serialization::PREDEF_TYPE_SAT_UACCUM_ID
@ PREDEF_TYPE_SAT_UACCUM_ID
The '_Sat unsigned _Accum' type.
Definition: ASTBitCodes.h:1032
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:223
clang::serialization::PREDEF_TYPE_UFRACT_ID
@ PREDEF_TYPE_UFRACT_ID
The 'unsigned _Fract' type.
Definition: ASTBitCodes.h:1014
clang::serialization::PREDEF_TYPE_DOUBLE_ID
@ PREDEF_TYPE_DOUBLE_ID
The 'double' type.
Definition: ASTBitCodes.h:897
clang::serialization::PREDEF_TYPE_UACCUM_ID
@ PREDEF_TYPE_UACCUM_ID
The 'unsigned _Accum' type.
Definition: ASTBitCodes.h:996
DeclCXX.h
clang::serialization::PREDEF_TYPE_LONGLONG_ID
@ PREDEF_TYPE_LONGLONG_ID
The (signed) 'long long' type.
Definition: ASTBitCodes.h:891
clang::serialization::PREDEF_TYPE_OMP_ARRAY_SHAPING
@ PREDEF_TYPE_OMP_ARRAY_SHAPING
The placeholder type for OpenMP array shaping operation.
Definition: ASTBitCodes.h:1056
clang::serialization::PREDEF_TYPE_ACCUM_ID
@ PREDEF_TYPE_ACCUM_ID
The '_Accum' type.
Definition: ASTBitCodes.h:987
clang::serialization::PREDEF_TYPE_SCHAR_ID
@ PREDEF_TYPE_SCHAR_ID
The 'signed char' type.
Definition: ASTBitCodes.h:876
clang::serialization::PREDEF_TYPE_SAT_LONG_FRACT_ID
@ PREDEF_TYPE_SAT_LONG_FRACT_ID
The '_Sat long _Fract' type.
Definition: ASTBitCodes.h:1044
ASTDeserializationListener.h
clang::serialization::PREDEF_TYPE_INT_ID
@ PREDEF_TYPE_INT_ID
The (signed) 'int' type.
Definition: ASTBitCodes.h:885
clang::serialization::PREDEF_TYPE_ULONG_ACCUM_ID
@ PREDEF_TYPE_ULONG_ACCUM_ID
The 'unsigned long _Accum' type.
Definition: ASTBitCodes.h:999
clang::serialization::PREDEF_TYPE_USHORT_ACCUM_ID
@ PREDEF_TYPE_USHORT_ACCUM_ID
The 'unsigned short _Accum' type.
Definition: ASTBitCodes.h:993
clang::serialization::PREDEF_TYPE_WCHAR_ID
@ PREDEF_TYPE_WCHAR_ID
The C++ 'wchar_t' type.
Definition: ASTBitCodes.h:879
DeclObjC.h
clang::serialization::PREDEF_TYPE_ARC_UNBRIDGED_CAST
@ PREDEF_TYPE_ARC_UNBRIDGED_CAST
ARC's unbridged-cast placeholder type.
Definition: ASTBitCodes.h:948
clang::serialization::needsAnonymousDeclarationNumber
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
Definition: ASTCommon.cpp:443
clang::serialization::PREDEF_TYPE_ULONG_ID
@ PREDEF_TYPE_ULONG_ID
The 'unsigned long' type.
Definition: ASTBitCodes.h:867
clang::Decl::getLexicalDeclContext
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition: DeclBase.h:843
clang::serialization::PREDEF_TYPE_SAT_ACCUM_ID
@ PREDEF_TYPE_SAT_ACCUM_ID
The '_Sat _Accum' type.
Definition: ASTBitCodes.h:1023
clang::Decl::Kind
Kind
Lists the kind of concrete classes of Decl.
Definition: DeclBase.h:92
clang::serialization::PREDEF_TYPE_CHAR_U_ID
@ PREDEF_TYPE_CHAR_U_ID
The 'char' type, when it is unsigned.
Definition: ASTBitCodes.h:855
clang::serialization::PREDEF_TYPE_SAT_ULONG_FRACT_ID
@ PREDEF_TYPE_SAT_ULONG_FRACT_ID
The '_Sat unsigned long _Fract' type.
Definition: ASTBitCodes.h:1053
clang::serialization::PREDEF_TYPE_UINT128_ID
@ PREDEF_TYPE_UINT128_ID
The '__uint128_t' type.
Definition: ASTBitCodes.h:909
ASTCommon.h
clang::DeclContext::getDeclKind
Decl::Kind getDeclKind() const
Definition: DeclBase.h:1853
clang::serialization::PREDEF_TYPE_OBJC_ID
@ PREDEF_TYPE_OBJC_ID
The ObjC 'id' type.
Definition: ASTBitCodes.h:924
clang::serialization::getDefinitiveDeclContext
const DeclContext * getDefinitiveDeclContext(const DeclContext *DC)
Retrieve the "definitive" declaration that provides all of the visible entries for the given declarat...
Definition: ASTCommon.cpp:285
clang::Selector::getNumArgs
unsigned getNumArgs() const
Definition: IdentifierTable.cpp:442
clang::serialization::PREDEF_TYPE_USHORT_ID
@ PREDEF_TYPE_USHORT_ID
The 'unsigned short' type.
Definition: ASTBitCodes.h:861
clang::serialization::PREDEF_TYPE_LONG_FRACT_ID
@ PREDEF_TYPE_LONG_FRACT_ID
The 'long _Fract' type.
Definition: ASTBitCodes.h:1008
IdentifierTable.h
clang::serialization::PREDEF_TYPE_CHAR8_ID
@ PREDEF_TYPE_CHAR8_ID
The C++ 'char8_t' type.
Definition: ASTBitCodes.h:981
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3285
clang::serialization::PREDEF_TYPE_FLOAT_ID
@ PREDEF_TYPE_FLOAT_ID
The 'float' type.
Definition: ASTBitCodes.h:894
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:69
clang::serialization::PREDEF_TYPE_SAT_SHORT_FRACT_ID
@ PREDEF_TYPE_SAT_SHORT_FRACT_ID
The '_Sat short _Fract' type.
Definition: ASTBitCodes.h:1038
clang::serialization::PREDEF_TYPE_BOUND_MEMBER
@ PREDEF_TYPE_BOUND_MEMBER
The placeholder type for bound member functions.
Definition: ASTBitCodes.h:936
clang::serialization::PREDEF_TYPE_UINT_ID
@ PREDEF_TYPE_UINT_ID
The 'unsigned int' type.
Definition: ASTBitCodes.h:864
clang::serialization::PREDEF_TYPE_DEPENDENT_ID
@ PREDEF_TYPE_DEPENDENT_ID
The placeholder type for dependent types.
Definition: ASTBitCodes.h:906
clang::serialization::PREDEF_TYPE_EVENT_ID
@ PREDEF_TYPE_EVENT_ID
OpenCL event type.
Definition: ASTBitCodes.h:957
clang::serialization::PREDEF_TYPE_CHAR_S_ID
@ PREDEF_TYPE_CHAR_S_ID
The 'char' type, when it is signed.
Definition: ASTBitCodes.h:873
clang::serialization::PREDEF_TYPE_BOOL_ID
@ PREDEF_TYPE_BOOL_ID
The 'bool' or '_Bool' type.
Definition: ASTBitCodes.h:852
clang::serialization::PREDEF_TYPE_OMP_ITERATOR
@ PREDEF_TYPE_OMP_ITERATOR
The placeholder type for OpenMP iterator expression.
Definition: ASTBitCodes.h:1059
clang::serialization::PREDEF_TYPE_ULONG_FRACT_ID
@ PREDEF_TYPE_ULONG_FRACT_ID
The 'unsigned long _Fract' type.
Definition: ASTBitCodes.h:1017
clang::serialization::PREDEF_TYPE_SAT_USHORT_ACCUM_ID
@ PREDEF_TYPE_SAT_USHORT_ACCUM_ID
The '_Sat unsigned short _Accum' type.
Definition: ASTBitCodes.h:1029
clang::serialization::PREDEF_TYPE_OBJC_CLASS
@ PREDEF_TYPE_OBJC_CLASS
The ObjC 'Class' type.
Definition: ASTBitCodes.h:927
clang::Decl::getFriendObjectKind
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so,...
Definition: DeclBase.h:1143
clang::serialization::PREDEF_TYPE_CLK_EVENT_ID
@ PREDEF_TYPE_CLK_EVENT_ID
OpenCL clk event type.
Definition: ASTBitCodes.h:960
clang::serialization::PREDEF_TYPE_BUILTIN_FN
@ PREDEF_TYPE_BUILTIN_FN
The placeholder type for builtin functions.
Definition: ASTBitCodes.h:954
clang::serialization::PREDEF_TYPE_SAT_FRACT_ID
@ PREDEF_TYPE_SAT_FRACT_ID
The '_Sat _Fract' type.
Definition: ASTBitCodes.h:1041
clang::serialization::PREDEF_TYPE_SAT_UFRACT_ID
@ PREDEF_TYPE_SAT_UFRACT_ID
The '_Sat unsigned _Fract' type.
Definition: ASTBitCodes.h:1050
clang::Selector::getIdentifierInfoForSlot
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
Definition: IdentifierTable.cpp:453
clang::serialization::PREDEF_TYPE_SHORT_ID
@ PREDEF_TYPE_SHORT_ID
The (signed) 'short' type.
Definition: ASTBitCodes.h:882
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:59
clang::serialization::PREDEF_TYPE_SAT_SHORT_ACCUM_ID
@ PREDEF_TYPE_SAT_SHORT_ACCUM_ID
The '_Sat short _Accum' type.
Definition: ASTBitCodes.h:1020
clang::serialization::isRedeclarableDeclKind
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
Definition: ASTCommon.cpp:344
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::BuiltinType::getKind
Kind getKind() const
Definition: Type.h:2515
clang::serialization::PREDEF_TYPE_SHORT_ACCUM_ID
@ PREDEF_TYPE_SHORT_ACCUM_ID
The 'short _Accum' type.
Definition: ASTBitCodes.h:984
clang::serialization::PREDEF_TYPE_LONG_ID
@ PREDEF_TYPE_LONG_ID
The (signed) 'long' type.
Definition: ASTBitCodes.h:888
clang::Builtin::ID
ID
Definition: Builtins.h:47
clang::serialization::PREDEF_TYPE_USHORT_FRACT_ID
@ PREDEF_TYPE_USHORT_FRACT_ID
The 'unsigned short _Fract' type.
Definition: ASTBitCodes.h:1011
clang
Dataflow Directional Tag Classes.
Definition: CalledOnceCheck.h:17
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:684
clang::serialization::PREDEF_TYPE_SAT_ULONG_ACCUM_ID
@ PREDEF_TYPE_SAT_ULONG_ACCUM_ID
The '_Sat unsigned long _Accum' type.
Definition: ASTBitCodes.h:1035
clang::serialization::PREDEF_TYPE_OVERLOAD_ID
@ PREDEF_TYPE_OVERLOAD_ID
The placeholder type for overloaded function sets.
Definition: ASTBitCodes.h:903
clang::serialization::PREDEF_TYPE_VOID_ID
@ PREDEF_TYPE_VOID_ID
The void type.
Definition: ASTBitCodes.h:849
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2040
clang::serialization::PREDEF_TYPE_RESERVE_ID_ID
@ PREDEF_TYPE_RESERVE_ID_ID
OpenCL reserve_id type.
Definition: ASTBitCodes.h:969
clang::NamedDecl::getDeclName
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:287
clang::serialization::ComputeHash
unsigned ComputeHash(Selector Sel)
Definition: ASTCommon.cpp:273
clang::DeclContext::isDependentContext
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
Definition: DeclBase.cpp:1138
clang::serialization::PREDEF_TYPE_LONGDOUBLE_ID
@ PREDEF_TYPE_LONGDOUBLE_ID
The 'long double' type.
Definition: ASTBitCodes.h:900
clang::ASTDeserializationListener::~ASTDeserializationListener
virtual ~ASTDeserializationListener()
Definition: ASTCommon.cpp:23
clang::serialization::PREDEF_TYPE_PSEUDO_OBJECT
@ PREDEF_TYPE_PSEUDO_OBJECT
The pseudo-object placeholder type.
Definition: ASTBitCodes.h:951
getDefinition
static const NamedDecl * getDefinition(const Decl *D)
Definition: SemaDecl.cpp:2636
clang::serialization::PREDEF_TYPE_SAT_LONG_ACCUM_ID
@ PREDEF_TYPE_SAT_LONG_ACCUM_ID
The '_Sat long _Accum' type.
Definition: ASTBitCodes.h:1026
clang::serialization::TypeIdxFromBuiltin
TypeIdx TypeIdxFromBuiltin(const BuiltinType *BT)
Definition: ASTCommon.cpp:26
clang::serialization::PREDEF_TYPE_CHAR16_ID
@ PREDEF_TYPE_CHAR16_ID
The C++ 'char16_t' type.
Definition: ASTBitCodes.h:918
clang::DeclContext::isFunctionOrMethod
bool isFunctionOrMethod() const
Definition: DeclBase.h:1912
clang::serialization::PREDEF_TYPE_FLOAT128_ID
@ PREDEF_TYPE_FLOAT128_ID
The '__float128' type.
Definition: ASTBitCodes.h:975
clang::serialization::PREDEF_TYPE_BFLOAT16_ID
@ PREDEF_TYPE_BFLOAT16_ID
The '__bf16' type.
Definition: ASTBitCodes.h:1065
clang::serialization::PREDEF_TYPE_HALF_ID
@ PREDEF_TYPE_HALF_ID
The OpenCL 'half' / ARM NEON __fp16 type.
Definition: ASTBitCodes.h:945
clang::serialization::PREDEF_TYPE_UCHAR_ID
@ PREDEF_TYPE_UCHAR_ID
The 'unsigned char' type.
Definition: ASTBitCodes.h:858
clang::serialization::PREDEF_TYPE_QUEUE_ID
@ PREDEF_TYPE_QUEUE_ID
OpenCL queue type.
Definition: ASTBitCodes.h:966
clang::serialization::PREDEF_TYPE_FRACT_ID
@ PREDEF_TYPE_FRACT_ID
The '_Fract' type.
Definition: ASTBitCodes.h:1005