clang  16.0.0git
ASTWriterDecl.cpp
Go to the documentation of this file.
1 //===--- ASTWriterDecl.cpp - Declaration Serialization --------------------===//
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 implements serialization for Declarations.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "ASTCommon.h"
14 #include "clang/AST/Attr.h"
15 #include "clang/AST/DeclCXX.h"
16 #include "clang/AST/DeclTemplate.h"
17 #include "clang/AST/DeclVisitor.h"
18 #include "clang/AST/Expr.h"
19 #include "clang/AST/OpenMPClause.h"
24 #include "llvm/Bitstream/BitstreamWriter.h"
25 #include "llvm/Support/ErrorHandling.h"
26 using namespace clang;
27 using namespace serialization;
28 
29 //===----------------------------------------------------------------------===//
30 // Declaration serialization
31 //===----------------------------------------------------------------------===//
32 
33 namespace clang {
34  class ASTDeclWriter : public DeclVisitor<ASTDeclWriter, void> {
35  ASTWriter &Writer;
36  ASTContext &Context;
37  ASTRecordWriter Record;
38 
40  unsigned AbbrevToUse;
41 
42  public:
43  ASTDeclWriter(ASTWriter &Writer, ASTContext &Context,
45  : Writer(Writer), Context(Context), Record(Writer, Record),
46  Code((serialization::DeclCode)0), AbbrevToUse(0) {}
47 
49  if (!Code)
50  llvm::report_fatal_error(StringRef("unexpected declaration kind '") +
51  D->getDeclKindName() + "'");
52  return Record.Emit(Code, AbbrevToUse);
53  }
54 
55  void Visit(Decl *D);
56 
57  void VisitDecl(Decl *D);
58  void VisitPragmaCommentDecl(PragmaCommentDecl *D);
59  void VisitPragmaDetectMismatchDecl(PragmaDetectMismatchDecl *D);
60  void VisitTranslationUnitDecl(TranslationUnitDecl *D);
61  void VisitNamedDecl(NamedDecl *D);
62  void VisitLabelDecl(LabelDecl *LD);
63  void VisitNamespaceDecl(NamespaceDecl *D);
64  void VisitUsingDirectiveDecl(UsingDirectiveDecl *D);
65  void VisitNamespaceAliasDecl(NamespaceAliasDecl *D);
66  void VisitTypeDecl(TypeDecl *D);
67  void VisitTypedefNameDecl(TypedefNameDecl *D);
68  void VisitTypedefDecl(TypedefDecl *D);
69  void VisitTypeAliasDecl(TypeAliasDecl *D);
70  void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D);
71  void VisitUnresolvedUsingIfExistsDecl(UnresolvedUsingIfExistsDecl *D);
72  void VisitTagDecl(TagDecl *D);
73  void VisitEnumDecl(EnumDecl *D);
74  void VisitRecordDecl(RecordDecl *D);
75  void VisitCXXRecordDecl(CXXRecordDecl *D);
76  void VisitClassTemplateSpecializationDecl(
78  void VisitClassTemplatePartialSpecializationDecl(
80  void VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D);
81  void VisitVarTemplatePartialSpecializationDecl(
83  void VisitClassScopeFunctionSpecializationDecl(
85  void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D);
86  void VisitValueDecl(ValueDecl *D);
87  void VisitEnumConstantDecl(EnumConstantDecl *D);
88  void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D);
89  void VisitDeclaratorDecl(DeclaratorDecl *D);
90  void VisitFunctionDecl(FunctionDecl *D);
91  void VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D);
92  void VisitCXXMethodDecl(CXXMethodDecl *D);
93  void VisitCXXConstructorDecl(CXXConstructorDecl *D);
94  void VisitCXXDestructorDecl(CXXDestructorDecl *D);
95  void VisitCXXConversionDecl(CXXConversionDecl *D);
96  void VisitFieldDecl(FieldDecl *D);
97  void VisitMSPropertyDecl(MSPropertyDecl *D);
98  void VisitMSGuidDecl(MSGuidDecl *D);
99  void VisitUnnamedGlobalConstantDecl(UnnamedGlobalConstantDecl *D);
100  void VisitTemplateParamObjectDecl(TemplateParamObjectDecl *D);
101  void VisitIndirectFieldDecl(IndirectFieldDecl *D);
102  void VisitVarDecl(VarDecl *D);
103  void VisitImplicitParamDecl(ImplicitParamDecl *D);
104  void VisitParmVarDecl(ParmVarDecl *D);
105  void VisitDecompositionDecl(DecompositionDecl *D);
106  void VisitBindingDecl(BindingDecl *D);
107  void VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D);
108  void VisitTemplateDecl(TemplateDecl *D);
109  void VisitConceptDecl(ConceptDecl *D);
110  void VisitImplicitConceptSpecializationDecl(
112  void VisitRequiresExprBodyDecl(RequiresExprBodyDecl *D);
113  void VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D);
114  void VisitClassTemplateDecl(ClassTemplateDecl *D);
115  void VisitVarTemplateDecl(VarTemplateDecl *D);
116  void VisitFunctionTemplateDecl(FunctionTemplateDecl *D);
117  void VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D);
118  void VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D);
119  void VisitUsingDecl(UsingDecl *D);
120  void VisitUsingEnumDecl(UsingEnumDecl *D);
121  void VisitUsingPackDecl(UsingPackDecl *D);
122  void VisitUsingShadowDecl(UsingShadowDecl *D);
123  void VisitConstructorUsingShadowDecl(ConstructorUsingShadowDecl *D);
124  void VisitLinkageSpecDecl(LinkageSpecDecl *D);
125  void VisitExportDecl(ExportDecl *D);
126  void VisitFileScopeAsmDecl(FileScopeAsmDecl *D);
127  void VisitTopLevelStmtDecl(TopLevelStmtDecl *D);
128  void VisitImportDecl(ImportDecl *D);
129  void VisitAccessSpecDecl(AccessSpecDecl *D);
130  void VisitFriendDecl(FriendDecl *D);
131  void VisitFriendTemplateDecl(FriendTemplateDecl *D);
132  void VisitStaticAssertDecl(StaticAssertDecl *D);
133  void VisitBlockDecl(BlockDecl *D);
134  void VisitCapturedDecl(CapturedDecl *D);
135  void VisitEmptyDecl(EmptyDecl *D);
136  void VisitLifetimeExtendedTemporaryDecl(LifetimeExtendedTemporaryDecl *D);
137  void VisitDeclContext(DeclContext *DC);
138  template <typename T> void VisitRedeclarable(Redeclarable<T> *D);
139  void VisitHLSLBufferDecl(HLSLBufferDecl *D);
140 
141  // FIXME: Put in the same order is DeclNodes.td?
142  void VisitObjCMethodDecl(ObjCMethodDecl *D);
143  void VisitObjCTypeParamDecl(ObjCTypeParamDecl *D);
144  void VisitObjCContainerDecl(ObjCContainerDecl *D);
145  void VisitObjCInterfaceDecl(ObjCInterfaceDecl *D);
146  void VisitObjCIvarDecl(ObjCIvarDecl *D);
147  void VisitObjCProtocolDecl(ObjCProtocolDecl *D);
148  void VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D);
149  void VisitObjCCategoryDecl(ObjCCategoryDecl *D);
150  void VisitObjCImplDecl(ObjCImplDecl *D);
151  void VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D);
152  void VisitObjCImplementationDecl(ObjCImplementationDecl *D);
153  void VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *D);
154  void VisitObjCPropertyDecl(ObjCPropertyDecl *D);
155  void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D);
156  void VisitOMPThreadPrivateDecl(OMPThreadPrivateDecl *D);
157  void VisitOMPAllocateDecl(OMPAllocateDecl *D);
158  void VisitOMPRequiresDecl(OMPRequiresDecl *D);
159  void VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D);
160  void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D);
161  void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D);
162 
163  /// Add an Objective-C type parameter list to the given record.
165  // Empty type parameter list.
166  if (!typeParams) {
167  Record.push_back(0);
168  return;
169  }
170 
171  Record.push_back(typeParams->size());
172  for (auto *typeParam : *typeParams) {
173  Record.AddDeclRef(typeParam);
174  }
175  Record.AddSourceLocation(typeParams->getLAngleLoc());
176  Record.AddSourceLocation(typeParams->getRAngleLoc());
177  }
178 
179  /// Add to the record the first declaration from each module file that
180  /// provides a declaration of D. The intent is to provide a sufficient
181  /// set such that reloading this set will load all current redeclarations.
182  void AddFirstDeclFromEachModule(const Decl *D, bool IncludeLocal) {
183  llvm::MapVector<ModuleFile*, const Decl*> Firsts;
184  // FIXME: We can skip entries that we know are implied by others.
185  for (const Decl *R = D->getMostRecentDecl(); R; R = R->getPreviousDecl()) {
186  if (R->isFromASTFile())
187  Firsts[Writer.Chain->getOwningModuleFile(R)] = R;
188  else if (IncludeLocal)
189  Firsts[nullptr] = R;
190  }
191  for (const auto &F : Firsts)
192  Record.AddDeclRef(F.second);
193  }
194 
195  /// Get the specialization decl from an entry in the specialization list.
196  template <typename EntryType>
198  getSpecializationDecl(EntryType &T) {
200  }
201 
202  /// Get the list of partial specializations from a template's common ptr.
203  template<typename T>
204  decltype(T::PartialSpecializations) &getPartialSpecializations(T *Common) {
205  return Common->PartialSpecializations;
206  }
208  return std::nullopt;
209  }
210 
211  template<typename DeclTy>
213  auto *Common = D->getCommonPtr();
214 
215  // If we have any lazy specializations, and the external AST source is
216  // our chained AST reader, we can just write out the DeclIDs. Otherwise,
217  // we need to resolve them to actual declarations.
218  if (Writer.Chain != Writer.Context->getExternalSource() &&
219  Common->LazySpecializations) {
220  D->LoadLazySpecializations();
221  assert(!Common->LazySpecializations);
222  }
223 
224  ArrayRef<DeclID> LazySpecializations;
225  if (auto *LS = Common->LazySpecializations)
226  LazySpecializations = llvm::makeArrayRef(LS + 1, LS[0]);
227 
228  // Add a slot to the record for the number of specializations.
229  unsigned I = Record.size();
230  Record.push_back(0);
231 
232  // AddFirstDeclFromEachModule might trigger deserialization, invalidating
233  // *Specializations iterators.
235  for (auto &Entry : Common->Specializations)
236  Specs.push_back(getSpecializationDecl(Entry));
237  for (auto &Entry : getPartialSpecializations(Common))
238  Specs.push_back(getSpecializationDecl(Entry));
239 
240  for (auto *D : Specs) {
241  assert(D->isCanonicalDecl() && "non-canonical decl in set");
242  AddFirstDeclFromEachModule(D, /*IncludeLocal*/true);
243  }
244  Record.append(LazySpecializations.begin(), LazySpecializations.end());
245 
246  // Update the size entry we added earlier.
247  Record[I] = Record.size() - I - 1;
248  }
249 
250  /// Ensure that this template specialization is associated with the specified
251  /// template on reload.
252  void RegisterTemplateSpecialization(const Decl *Template,
253  const Decl *Specialization) {
254  Template = Template->getCanonicalDecl();
255 
256  // If the canonical template is local, we'll write out this specialization
257  // when we emit it.
258  // FIXME: We can do the same thing if there is any local declaration of
259  // the template, to avoid emitting an update record.
260  if (!Template->isFromASTFile())
261  return;
262 
263  // We only need to associate the first local declaration of the
264  // specialization. The other declarations will get pulled in by it.
266  return;
267 
268  Writer.DeclUpdates[Template].push_back(ASTWriter::DeclUpdate(
270  }
271  };
272 }
273 
276 
277  // Source locations require array (variable-length) abbreviations. The
278  // abbreviation infrastructure requires that arrays are encoded last, so
279  // we handle it here in the case of those classes derived from DeclaratorDecl
280  if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {
281  if (auto *TInfo = DD->getTypeSourceInfo())
282  Record.AddTypeLoc(TInfo->getTypeLoc());
283  }
284 
285  // Handle FunctionDecl's body here and write it after all other Stmts/Exprs
286  // have been written. We want it last because we will not read it back when
287  // retrieving it from the AST, we'll just lazily set the offset.
288  if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
289  Record.push_back(FD->doesThisDeclarationHaveABody());
290  if (FD->doesThisDeclarationHaveABody())
291  Record.AddFunctionDefinition(FD);
292  }
293 
294  // If this declaration is also a DeclContext, write blocks for the
295  // declarations that lexically stored inside its context and those
296  // declarations that are visible from its context.
297  if (DeclContext *DC = dyn_cast<DeclContext>(D))
298  VisitDeclContext(DC);
299 }
300 
302  Record.AddDeclRef(cast_or_null<Decl>(D->getDeclContext()));
303  if (D->getDeclContext() != D->getLexicalDeclContext())
304  Record.AddDeclRef(cast_or_null<Decl>(D->getLexicalDeclContext()));
305  else
306  Record.push_back(0);
307  Record.push_back(D->isInvalidDecl());
308  Record.push_back(D->hasAttrs());
309  if (D->hasAttrs())
310  Record.AddAttributes(D->getAttrs());
311  Record.push_back(D->isImplicit());
312  Record.push_back(D->isUsed(false));
313  Record.push_back(D->isReferenced());
314  Record.push_back(D->isTopLevelDeclInObjCContainer());
315  Record.push_back(D->getAccess());
316  Record.push_back((uint64_t)D->getModuleOwnershipKind());
317  Record.push_back(Writer.getSubmoduleID(D->getOwningModule()));
318 
319  // If this declaration injected a name into a context different from its
320  // lexical context, and that context is an imported namespace, we need to
321  // update its visible declarations to include this name.
322  //
323  // This happens when we instantiate a class with a friend declaration or a
324  // function with a local extern declaration, for instance.
325  //
326  // FIXME: Can we handle this in AddedVisibleDecl instead?
327  if (D->isOutOfLine()) {
328  auto *DC = D->getDeclContext();
329  while (auto *NS = dyn_cast<NamespaceDecl>(DC->getRedeclContext())) {
330  if (!NS->isFromASTFile())
331  break;
332  Writer.UpdatedDeclContexts.insert(NS->getPrimaryContext());
333  if (!NS->isInlineNamespace())
334  break;
335  DC = NS->getParent();
336  }
337  }
338 }
339 
341  StringRef Arg = D->getArg();
342  Record.push_back(Arg.size());
343  VisitDecl(D);
344  Record.AddSourceLocation(D->getBeginLoc());
345  Record.push_back(D->getCommentKind());
346  Record.AddString(Arg);
348 }
349 
352  StringRef Name = D->getName();
353  StringRef Value = D->getValue();
354  Record.push_back(Name.size() + 1 + Value.size());
355  VisitDecl(D);
356  Record.AddSourceLocation(D->getBeginLoc());
357  Record.AddString(Name);
358  Record.AddString(Value);
360 }
361 
363  llvm_unreachable("Translation units aren't directly serialized");
364 }
365 
367  VisitDecl(D);
368  Record.AddDeclarationName(D->getDeclName());
369  Record.push_back(needsAnonymousDeclarationNumber(D)
370  ? Writer.getAnonymousDeclarationNumber(D)
371  : 0);
372 }
373 
375  VisitNamedDecl(D);
376  Record.AddSourceLocation(D->getBeginLoc());
377  Record.AddTypeRef(QualType(D->getTypeForDecl(), 0));
378 }
379 
381  VisitRedeclarable(D);
382  VisitTypeDecl(D);
383  Record.AddTypeSourceInfo(D->getTypeSourceInfo());
384  Record.push_back(D->isModed());
385  if (D->isModed())
386  Record.AddTypeRef(D->getUnderlyingType());
387  Record.AddDeclRef(D->getAnonDeclWithTypedefName(false));
388 }
389 
391  VisitTypedefNameDecl(D);
392  if (D->getDeclContext() == D->getLexicalDeclContext() &&
393  !D->hasAttrs() &&
394  !D->isImplicit() &&
395  D->getFirstDecl() == D->getMostRecentDecl() &&
396  !D->isInvalidDecl() &&
398  !D->isModulePrivate() &&
401  AbbrevToUse = Writer.getDeclTypedefAbbrev();
402 
404 }
405 
407  VisitTypedefNameDecl(D);
408  Record.AddDeclRef(D->getDescribedAliasTemplate());
410 }
411 
413  VisitRedeclarable(D);
414  VisitTypeDecl(D);
415  Record.push_back(D->getIdentifierNamespace());
416  Record.push_back((unsigned)D->getTagKind()); // FIXME: stable encoding
417  if (!isa<CXXRecordDecl>(D))
418  Record.push_back(D->isCompleteDefinition());
419  Record.push_back(D->isEmbeddedInDeclarator());
420  Record.push_back(D->isFreeStanding());
421  Record.push_back(D->isCompleteDefinitionRequired());
422  Record.AddSourceRange(D->getBraceRange());
423 
424  if (D->hasExtInfo()) {
425  Record.push_back(1);
426  Record.AddQualifierInfo(*D->getExtInfo());
427  } else if (auto *TD = D->getTypedefNameForAnonDecl()) {
428  Record.push_back(2);
429  Record.AddDeclRef(TD);
430  Record.AddIdentifierRef(TD->getDeclName().getAsIdentifierInfo());
431  } else {
432  Record.push_back(0);
433  }
434 }
435 
437  VisitTagDecl(D);
438  Record.AddTypeSourceInfo(D->getIntegerTypeSourceInfo());
439  if (!D->getIntegerTypeSourceInfo())
440  Record.AddTypeRef(D->getIntegerType());
441  Record.AddTypeRef(D->getPromotionType());
442  Record.push_back(D->getNumPositiveBits());
443  Record.push_back(D->getNumNegativeBits());
444  Record.push_back(D->isScoped());
445  Record.push_back(D->isScopedUsingClassTag());
446  Record.push_back(D->isFixed());
447  Record.push_back(D->getODRHash());
448 
449  if (MemberSpecializationInfo *MemberInfo = D->getMemberSpecializationInfo()) {
450  Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
451  Record.push_back(MemberInfo->getTemplateSpecializationKind());
452  Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
453  } else {
454  Record.AddDeclRef(nullptr);
455  }
456 
457  if (D->getDeclContext() == D->getLexicalDeclContext() &&
458  !D->hasAttrs() &&
459  !D->isImplicit() &&
460  !D->isUsed(false) &&
461  !D->hasExtInfo() &&
463  D->getFirstDecl() == D->getMostRecentDecl() &&
464  !D->isInvalidDecl() &&
465  !D->isReferenced() &&
467  D->getAccess() == AS_none &&
468  !D->isModulePrivate() &&
470  !D->getIntegerTypeSourceInfo() &&
474  AbbrevToUse = Writer.getDeclEnumAbbrev();
475 
477 }
478 
480  VisitTagDecl(D);
481  Record.push_back(D->hasFlexibleArrayMember());
482  Record.push_back(D->isAnonymousStructOrUnion());
483  Record.push_back(D->hasObjectMember());
484  Record.push_back(D->hasVolatileMember());
485  Record.push_back(D->isNonTrivialToPrimitiveDefaultInitialize());
486  Record.push_back(D->isNonTrivialToPrimitiveCopy());
487  Record.push_back(D->isNonTrivialToPrimitiveDestroy());
489  Record.push_back(D->hasNonTrivialToPrimitiveDestructCUnion());
490  Record.push_back(D->hasNonTrivialToPrimitiveCopyCUnion());
491  Record.push_back(D->isParamDestroyedInCallee());
492  Record.push_back(D->getArgPassingRestrictions());
493 
494  if (D->getDeclContext() == D->getLexicalDeclContext() &&
495  !D->hasAttrs() &&
496  !D->isImplicit() &&
497  !D->isUsed(false) &&
498  !D->hasExtInfo() &&
500  D->getFirstDecl() == D->getMostRecentDecl() &&
501  !D->isInvalidDecl() &&
502  !D->isReferenced() &&
504  D->getAccess() == AS_none &&
505  !D->isModulePrivate() &&
509  AbbrevToUse = Writer.getDeclRecordAbbrev();
510 
512 }
513 
515  VisitNamedDecl(D);
516  Record.AddTypeRef(D->getType());
517 }
518 
520  VisitValueDecl(D);
521  Record.push_back(D->getInitExpr()? 1 : 0);
522  if (D->getInitExpr())
523  Record.AddStmt(D->getInitExpr());
524  Record.AddAPSInt(D->getInitVal());
525 
527 }
528 
530  VisitValueDecl(D);
531  Record.AddSourceLocation(D->getInnerLocStart());
532  Record.push_back(D->hasExtInfo());
533  if (D->hasExtInfo()) {
534  DeclaratorDecl::ExtInfo *Info = D->getExtInfo();
535  Record.AddQualifierInfo(*Info);
536  Record.AddStmt(Info->TrailingRequiresClause);
537  }
538  // The location information is deferred until the end of the record.
539  Record.AddTypeRef(D->getTypeSourceInfo() ? D->getTypeSourceInfo()->getType()
540  : QualType());
541 }
542 
544  VisitRedeclarable(D);
545 
546  Record.push_back(D->getTemplatedKind());
547  switch (D->getTemplatedKind()) {
549  break;
551  Record.AddDeclRef(D->getInstantiatedFromDecl());
552  break;
554  Record.AddDeclRef(D->getDescribedFunctionTemplate());
555  break;
558  Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
559  Record.push_back(MemberInfo->getTemplateSpecializationKind());
560  Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
561  break;
562  }
565  FTSInfo = D->getTemplateSpecializationInfo();
566 
567  RegisterTemplateSpecialization(FTSInfo->getTemplate(), D);
568 
569  Record.AddDeclRef(FTSInfo->getTemplate());
570  Record.push_back(FTSInfo->getTemplateSpecializationKind());
571 
572  // Template arguments.
573  Record.AddTemplateArgumentList(FTSInfo->TemplateArguments);
574 
575  // Template args as written.
576  Record.push_back(FTSInfo->TemplateArgumentsAsWritten != nullptr);
577  if (FTSInfo->TemplateArgumentsAsWritten) {
578  Record.push_back(FTSInfo->TemplateArgumentsAsWritten->NumTemplateArgs);
579  for (int i=0, e = FTSInfo->TemplateArgumentsAsWritten->NumTemplateArgs;
580  i!=e; ++i)
581  Record.AddTemplateArgumentLoc(
582  (*FTSInfo->TemplateArgumentsAsWritten)[i]);
583  Record.AddSourceLocation(FTSInfo->TemplateArgumentsAsWritten->LAngleLoc);
584  Record.AddSourceLocation(FTSInfo->TemplateArgumentsAsWritten->RAngleLoc);
585  }
586 
587  Record.AddSourceLocation(FTSInfo->getPointOfInstantiation());
588 
589  if (MemberSpecializationInfo *MemberInfo =
590  FTSInfo->getMemberSpecializationInfo()) {
591  Record.push_back(1);
592  Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
593  Record.push_back(MemberInfo->getTemplateSpecializationKind());
594  Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
595  } else {
596  Record.push_back(0);
597  }
598 
599  if (D->isCanonicalDecl()) {
600  // Write the template that contains the specializations set. We will
601  // add a FunctionTemplateSpecializationInfo to it when reading.
602  Record.AddDeclRef(FTSInfo->getTemplate()->getCanonicalDecl());
603  }
604  break;
605  }
608  DFTSInfo = D->getDependentSpecializationInfo();
609 
610  // Templates.
611  Record.push_back(DFTSInfo->getNumTemplates());
612  for (int i=0, e = DFTSInfo->getNumTemplates(); i != e; ++i)
613  Record.AddDeclRef(DFTSInfo->getTemplate(i));
614 
615  // Templates args.
616  Record.push_back(DFTSInfo->getNumTemplateArgs());
617  for (int i=0, e = DFTSInfo->getNumTemplateArgs(); i != e; ++i)
618  Record.AddTemplateArgumentLoc(DFTSInfo->getTemplateArg(i));
619  Record.AddSourceLocation(DFTSInfo->getLAngleLoc());
620  Record.AddSourceLocation(DFTSInfo->getRAngleLoc());
621  break;
622  }
623  }
624 
625  VisitDeclaratorDecl(D);
626  Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName());
627  Record.push_back(D->getIdentifierNamespace());
628 
629  // FunctionDecl's body is handled last at ASTWriterDecl::Visit,
630  // after everything else is written.
631  Record.push_back(
632  static_cast<int>(D->getStorageClass())); // FIXME: stable encoding
633  Record.push_back(D->isInlineSpecified());
634  Record.push_back(D->isInlined());
635  Record.push_back(D->isVirtualAsWritten());
636  Record.push_back(D->isPure());
637  Record.push_back(D->hasInheritedPrototype());
638  Record.push_back(D->hasWrittenPrototype());
639  Record.push_back(D->isDeletedBit());
640  Record.push_back(D->isTrivial());
641  Record.push_back(D->isTrivialForCall());
642  Record.push_back(D->isDefaulted());
643  Record.push_back(D->isExplicitlyDefaulted());
644  Record.push_back(D->hasImplicitReturnZero());
645  Record.push_back(static_cast<uint64_t>(D->getConstexprKind()));
646  Record.push_back(D->usesSEHTry());
647  Record.push_back(D->hasSkippedBody());
648  Record.push_back(D->isMultiVersion());
649  Record.push_back(D->isLateTemplateParsed());
650  Record.push_back(D->FriendConstraintRefersToEnclosingTemplate());
651  Record.push_back(D->getLinkageInternal());
652  Record.AddSourceLocation(D->getEndLoc());
653  Record.AddSourceLocation(D->getDefaultLoc());
654 
655  Record.push_back(D->getODRHash());
656 
657  if (D->isDefaulted()) {
658  if (auto *FDI = D->getDefaultedFunctionInfo()) {
659  Record.push_back(FDI->getUnqualifiedLookups().size());
660  for (DeclAccessPair P : FDI->getUnqualifiedLookups()) {
661  Record.AddDeclRef(P.getDecl());
662  Record.push_back(P.getAccess());
663  }
664  } else {
665  Record.push_back(0);
666  }
667  }
668 
669  Record.push_back(D->param_size());
670  for (auto *P : D->parameters())
671  Record.AddDeclRef(P);
673 }
674 
676  ASTRecordWriter &Record) {
677  uint64_t Kind = static_cast<uint64_t>(ES.getKind());
678  Kind = Kind << 1 | static_cast<bool>(ES.getExpr());
679  Record.push_back(Kind);
680  if (ES.getExpr()) {
681  Record.AddStmt(ES.getExpr());
682  }
683 }
684 
687  Record.AddDeclRef(D->Ctor);
688  VisitFunctionDecl(D);
689  Record.push_back(D->isCopyDeductionCandidate());
691 }
692 
694  VisitNamedDecl(D);
695  // FIXME: convert to LazyStmtPtr?
696  // Unlike C/C++, method bodies will never be in header files.
697  bool HasBodyStuff = D->getBody() != nullptr;
698  Record.push_back(HasBodyStuff);
699  if (HasBodyStuff) {
700  Record.AddStmt(D->getBody());
701  }
702  Record.AddDeclRef(D->getSelfDecl());
703  Record.AddDeclRef(D->getCmdDecl());
704  Record.push_back(D->isInstanceMethod());
705  Record.push_back(D->isVariadic());
706  Record.push_back(D->isPropertyAccessor());
707  Record.push_back(D->isSynthesizedAccessorStub());
708  Record.push_back(D->isDefined());
709  Record.push_back(D->isOverriding());
710  Record.push_back(D->hasSkippedBody());
711 
712  Record.push_back(D->isRedeclaration());
713  Record.push_back(D->hasRedeclaration());
714  if (D->hasRedeclaration()) {
715  assert(Context.getObjCMethodRedeclaration(D));
716  Record.AddDeclRef(Context.getObjCMethodRedeclaration(D));
717  }
718 
719  // FIXME: stable encoding for @required/@optional
720  Record.push_back(D->getImplementationControl());
721  // FIXME: stable encoding for in/out/inout/bycopy/byref/oneway/nullability
722  Record.push_back(D->getObjCDeclQualifier());
723  Record.push_back(D->hasRelatedResultType());
724  Record.AddTypeRef(D->getReturnType());
725  Record.AddTypeSourceInfo(D->getReturnTypeSourceInfo());
726  Record.AddSourceLocation(D->getEndLoc());
727  Record.push_back(D->param_size());
728  for (const auto *P : D->parameters())
729  Record.AddDeclRef(P);
730 
731  Record.push_back(D->getSelLocsKind());
732  unsigned NumStoredSelLocs = D->getNumStoredSelLocs();
733  SourceLocation *SelLocs = D->getStoredSelLocs();
734  Record.push_back(NumStoredSelLocs);
735  for (unsigned i = 0; i != NumStoredSelLocs; ++i)
736  Record.AddSourceLocation(SelLocs[i]);
737 
739 }
740 
742  VisitTypedefNameDecl(D);
743  Record.push_back(D->Variance);
744  Record.push_back(D->Index);
745  Record.AddSourceLocation(D->VarianceLoc);
746  Record.AddSourceLocation(D->ColonLoc);
747 
749 }
750 
752  VisitNamedDecl(D);
753  Record.AddSourceLocation(D->getAtStartLoc());
754  Record.AddSourceRange(D->getAtEndRange());
755  // Abstract class (no need to define a stable serialization::DECL code).
756 }
757 
759  VisitRedeclarable(D);
760  VisitObjCContainerDecl(D);
761  Record.AddTypeRef(QualType(D->getTypeForDecl(), 0));
762  AddObjCTypeParamList(D->TypeParamList);
763 
764  Record.push_back(D->isThisDeclarationADefinition());
765  if (D->isThisDeclarationADefinition()) {
766  // Write the DefinitionData
767  ObjCInterfaceDecl::DefinitionData &Data = D->data();
768 
769  Record.AddTypeSourceInfo(D->getSuperClassTInfo());
770  Record.AddSourceLocation(D->getEndOfDefinitionLoc());
771  Record.push_back(Data.HasDesignatedInitializers);
772 
773  // Write out the protocols that are directly referenced by the @interface.
774  Record.push_back(Data.ReferencedProtocols.size());
775  for (const auto *P : D->protocols())
776  Record.AddDeclRef(P);
777  for (const auto &PL : D->protocol_locs())
778  Record.AddSourceLocation(PL);
779 
780  // Write out the protocols that are transitively referenced.
781  Record.push_back(Data.AllReferencedProtocols.size());
783  P = Data.AllReferencedProtocols.begin(),
784  PEnd = Data.AllReferencedProtocols.end();
785  P != PEnd; ++P)
786  Record.AddDeclRef(*P);
787 
788 
789  if (ObjCCategoryDecl *Cat = D->getCategoryListRaw()) {
790  // Ensure that we write out the set of categories for this class.
791  Writer.ObjCClassesWithCategories.insert(D);
792 
793  // Make sure that the categories get serialized.
794  for (; Cat; Cat = Cat->getNextClassCategoryRaw())
795  (void)Writer.GetDeclRef(Cat);
796  }
797  }
798 
800 }
801 
803  VisitFieldDecl(D);
804  // FIXME: stable encoding for @public/@private/@protected/@package
805  Record.push_back(D->getAccessControl());
806  Record.push_back(D->getSynthesize());
807 
808  if (D->getDeclContext() == D->getLexicalDeclContext() &&
809  !D->hasAttrs() &&
810  !D->isImplicit() &&
811  !D->isUsed(false) &&
812  !D->isInvalidDecl() &&
813  !D->isReferenced() &&
814  !D->isModulePrivate() &&
815  !D->getBitWidth() &&
816  !D->hasExtInfo() &&
817  D->getDeclName())
818  AbbrevToUse = Writer.getDeclObjCIvarAbbrev();
819 
821 }
822 
824  VisitRedeclarable(D);
825  VisitObjCContainerDecl(D);
826 
827  Record.push_back(D->isThisDeclarationADefinition());
828  if (D->isThisDeclarationADefinition()) {
829  Record.push_back(D->protocol_size());
830  for (const auto *I : D->protocols())
831  Record.AddDeclRef(I);
832  for (const auto &PL : D->protocol_locs())
833  Record.AddSourceLocation(PL);
834  Record.push_back(D->getODRHash());
835  }
836 
838 }
839 
841  VisitFieldDecl(D);
843 }
844 
846  VisitObjCContainerDecl(D);
847  Record.AddSourceLocation(D->getCategoryNameLoc());
848  Record.AddSourceLocation(D->getIvarLBraceLoc());
849  Record.AddSourceLocation(D->getIvarRBraceLoc());
850  Record.AddDeclRef(D->getClassInterface());
851  AddObjCTypeParamList(D->TypeParamList);
852  Record.push_back(D->protocol_size());
853  for (const auto *I : D->protocols())
854  Record.AddDeclRef(I);
855  for (const auto &PL : D->protocol_locs())
856  Record.AddSourceLocation(PL);
858 }
859 
861  VisitNamedDecl(D);
862  Record.AddDeclRef(D->getClassInterface());
864 }
865 
867  VisitNamedDecl(D);
868  Record.AddSourceLocation(D->getAtLoc());
869  Record.AddSourceLocation(D->getLParenLoc());
870  Record.AddTypeRef(D->getType());
871  Record.AddTypeSourceInfo(D->getTypeSourceInfo());
872  // FIXME: stable encoding
873  Record.push_back((unsigned)D->getPropertyAttributes());
874  Record.push_back((unsigned)D->getPropertyAttributesAsWritten());
875  // FIXME: stable encoding
876  Record.push_back((unsigned)D->getPropertyImplementation());
877  Record.AddDeclarationName(D->getGetterName());
878  Record.AddSourceLocation(D->getGetterNameLoc());
879  Record.AddDeclarationName(D->getSetterName());
880  Record.AddSourceLocation(D->getSetterNameLoc());
881  Record.AddDeclRef(D->getGetterMethodDecl());
882  Record.AddDeclRef(D->getSetterMethodDecl());
883  Record.AddDeclRef(D->getPropertyIvarDecl());
885 }
886 
888  VisitObjCContainerDecl(D);
889  Record.AddDeclRef(D->getClassInterface());
890  // Abstract class (no need to define a stable serialization::DECL code).
891 }
892 
894  VisitObjCImplDecl(D);
895  Record.AddSourceLocation(D->getCategoryNameLoc());
897 }
898 
900  VisitObjCImplDecl(D);
901  Record.AddDeclRef(D->getSuperClass());
902  Record.AddSourceLocation(D->getSuperClassLoc());
903  Record.AddSourceLocation(D->getIvarLBraceLoc());
904  Record.AddSourceLocation(D->getIvarRBraceLoc());
905  Record.push_back(D->hasNonZeroConstructors());
906  Record.push_back(D->hasDestructors());
907  Record.push_back(D->NumIvarInitializers);
908  if (D->NumIvarInitializers)
909  Record.AddCXXCtorInitializers(
910  llvm::makeArrayRef(D->init_begin(), D->init_end()));
912 }
913 
915  VisitDecl(D);
916  Record.AddSourceLocation(D->getBeginLoc());
917  Record.AddDeclRef(D->getPropertyDecl());
918  Record.AddDeclRef(D->getPropertyIvarDecl());
919  Record.AddSourceLocation(D->getPropertyIvarDeclLoc());
920  Record.AddDeclRef(D->getGetterMethodDecl());
921  Record.AddDeclRef(D->getSetterMethodDecl());
922  Record.AddStmt(D->getGetterCXXConstructor());
923  Record.AddStmt(D->getSetterCXXAssignment());
925 }
926 
928  VisitDeclaratorDecl(D);
929  Record.push_back(D->isMutable());
930 
931  FieldDecl::InitStorageKind ISK = D->InitStorage.getInt();
932  Record.push_back(ISK);
933  if (ISK == FieldDecl::ISK_CapturedVLAType)
934  Record.AddTypeRef(QualType(D->getCapturedVLAType(), 0));
935  else if (ISK)
936  Record.AddStmt(D->getInClassInitializer());
937 
938  Record.AddStmt(D->getBitWidth());
939 
940  if (!D->getDeclName())
941  Record.AddDeclRef(Context.getInstantiatedFromUnnamedFieldDecl(D));
942 
943  if (D->getDeclContext() == D->getLexicalDeclContext() &&
944  !D->hasAttrs() &&
945  !D->isImplicit() &&
946  !D->isUsed(false) &&
947  !D->isInvalidDecl() &&
948  !D->isReferenced() &&
950  !D->isModulePrivate() &&
951  !D->getBitWidth() &&
952  !D->hasInClassInitializer() &&
953  !D->hasCapturedVLAType() &&
954  !D->hasExtInfo() &&
957  D->getDeclName())
958  AbbrevToUse = Writer.getDeclFieldAbbrev();
959 
961 }
962 
964  VisitDeclaratorDecl(D);
965  Record.AddIdentifierRef(D->getGetterId());
966  Record.AddIdentifierRef(D->getSetterId());
968 }
969 
971  VisitValueDecl(D);
972  MSGuidDecl::Parts Parts = D->getParts();
973  Record.push_back(Parts.Part1);
974  Record.push_back(Parts.Part2);
975  Record.push_back(Parts.Part3);
976  Record.append(std::begin(Parts.Part4And5), std::end(Parts.Part4And5));
978 }
979 
982  VisitValueDecl(D);
983  Record.AddAPValue(D->getValue());
985 }
986 
988  VisitValueDecl(D);
989  Record.AddAPValue(D->getValue());
991 }
992 
994  VisitValueDecl(D);
995  Record.push_back(D->getChainingSize());
996 
997  for (const auto *P : D->chain())
998  Record.AddDeclRef(P);
1000 }
1001 
1003  VisitRedeclarable(D);
1004  VisitDeclaratorDecl(D);
1005  Record.push_back(D->getStorageClass());
1006  Record.push_back(D->getTSCSpec());
1007  Record.push_back(D->getInitStyle());
1008  Record.push_back(D->isARCPseudoStrong());
1009  if (!isa<ParmVarDecl>(D)) {
1010  Record.push_back(D->isThisDeclarationADemotedDefinition());
1011  Record.push_back(D->isExceptionVariable());
1012  Record.push_back(D->isNRVOVariable());
1013  Record.push_back(D->isCXXForRangeDecl());
1014  Record.push_back(D->isObjCForDecl());
1015  Record.push_back(D->isInline());
1016  Record.push_back(D->isInlineSpecified());
1017  Record.push_back(D->isConstexpr());
1018  Record.push_back(D->isInitCapture());
1019  Record.push_back(D->isPreviousDeclInSameBlockScope());
1020  if (const auto *IPD = dyn_cast<ImplicitParamDecl>(D))
1021  Record.push_back(static_cast<unsigned>(IPD->getParameterKind()));
1022  else
1023  Record.push_back(0);
1024  Record.push_back(D->isEscapingByref());
1025  }
1026  Record.push_back(D->getLinkageInternal());
1027 
1028  Record.AddVarDeclInit(D);
1029 
1030  if (D->hasAttr<BlocksAttr>() && D->getType()->getAsCXXRecordDecl()) {
1031  BlockVarCopyInit Init = Writer.Context->getBlockVarCopyInit(D);
1032  Record.AddStmt(Init.getCopyExpr());
1033  if (Init.getCopyExpr())
1034  Record.push_back(Init.canThrow());
1035  }
1036 
1037  if (D->getStorageDuration() == SD_Static) {
1038  bool ModulesCodegen = false;
1039  if (Writer.WritingModule &&
1041  !isa<VarTemplateSpecializationDecl>(D)) {
1042  // When building a C++20 module interface unit or a partition unit, a
1043  // strong definition in the module interface is provided by the
1044  // compilation of that unit, not by its users. (Inline variables are still
1045  // emitted in module users.)
1046  ModulesCodegen =
1047  (Writer.WritingModule->isInterfaceOrPartition() ||
1048  (D->hasAttr<DLLExportAttr>() &&
1049  Writer.Context->getLangOpts().BuildingPCHWithObjectFile)) &&
1050  Writer.Context->GetGVALinkageForVariable(D) == GVA_StrongExternal;
1051  }
1052  Record.push_back(ModulesCodegen);
1053  if (ModulesCodegen)
1054  Writer.ModularCodegenDecls.push_back(Writer.GetDeclRef(D));
1055  }
1056 
1057  enum {
1058  VarNotTemplate = 0, VarTemplate, StaticDataMemberSpecialization
1059  };
1060  if (VarTemplateDecl *TemplD = D->getDescribedVarTemplate()) {
1061  Record.push_back(VarTemplate);
1062  Record.AddDeclRef(TemplD);
1063  } else if (MemberSpecializationInfo *SpecInfo
1064  = D->getMemberSpecializationInfo()) {
1065  Record.push_back(StaticDataMemberSpecialization);
1066  Record.AddDeclRef(SpecInfo->getInstantiatedFrom());
1067  Record.push_back(SpecInfo->getTemplateSpecializationKind());
1068  Record.AddSourceLocation(SpecInfo->getPointOfInstantiation());
1069  } else {
1070  Record.push_back(VarNotTemplate);
1071  }
1072 
1073  if (D->getDeclContext() == D->getLexicalDeclContext() &&
1074  !D->hasAttrs() &&
1075  !D->isImplicit() &&
1076  !D->isUsed(false) &&
1077  !D->isInvalidDecl() &&
1078  !D->isReferenced() &&
1080  D->getAccess() == AS_none &&
1081  !D->isModulePrivate() &&
1084  !D->hasExtInfo() &&
1085  D->getFirstDecl() == D->getMostRecentDecl() &&
1086  D->getKind() == Decl::Var &&
1087  !D->isInline() &&
1088  !D->isConstexpr() &&
1089  !D->isInitCapture() &&
1091  !(D->hasAttr<BlocksAttr>() && D->getType()->getAsCXXRecordDecl()) &&
1092  !D->isEscapingByref() &&
1093  D->getStorageDuration() != SD_Static &&
1095  AbbrevToUse = Writer.getDeclVarAbbrev();
1096 
1097  Code = serialization::DECL_VAR;
1098 }
1099 
1101  VisitVarDecl(D);
1103 }
1104 
1106  VisitVarDecl(D);
1107  Record.push_back(D->isObjCMethodParameter());
1108  Record.push_back(D->getFunctionScopeDepth());
1109  Record.push_back(D->getFunctionScopeIndex());
1110  Record.push_back(D->getObjCDeclQualifier()); // FIXME: stable encoding
1111  Record.push_back(D->isKNRPromoted());
1112  Record.push_back(D->hasInheritedDefaultArg());
1113  Record.push_back(D->hasUninstantiatedDefaultArg());
1114  if (D->hasUninstantiatedDefaultArg())
1115  Record.AddStmt(D->getUninstantiatedDefaultArg());
1117 
1118  // If the assumptions about the DECL_PARM_VAR abbrev are true, use it. Here
1119  // we dynamically check for the properties that we optimize for, but don't
1120  // know are true of all PARM_VAR_DECLs.
1121  if (D->getDeclContext() == D->getLexicalDeclContext() &&
1122  !D->hasAttrs() &&
1123  !D->hasExtInfo() &&
1124  !D->isImplicit() &&
1125  !D->isUsed(false) &&
1126  !D->isInvalidDecl() &&
1127  !D->isReferenced() &&
1128  D->getAccess() == AS_none &&
1129  !D->isModulePrivate() &&
1130  D->getStorageClass() == 0 &&
1131  D->getInitStyle() == VarDecl::CInit && // Can params have anything else?
1132  D->getFunctionScopeDepth() == 0 &&
1133  D->getObjCDeclQualifier() == 0 &&
1134  !D->isKNRPromoted() &&
1135  !D->hasInheritedDefaultArg() &&
1136  D->getInit() == nullptr &&
1137  !D->hasUninstantiatedDefaultArg()) // No default expr.
1138  AbbrevToUse = Writer.getDeclParmVarAbbrev();
1139 
1140  // Check things we know are true of *every* PARM_VAR_DECL, which is more than
1141  // just us assuming it.
1142  assert(!D->getTSCSpec() && "PARM_VAR_DECL can't use TLS");
1144  && "PARM_VAR_DECL can't be demoted definition.");
1145  assert(D->getAccess() == AS_none && "PARM_VAR_DECL can't be public/private");
1146  assert(!D->isExceptionVariable() && "PARM_VAR_DECL can't be exception var");
1147  assert(D->getPreviousDecl() == nullptr && "PARM_VAR_DECL can't be redecl");
1148  assert(!D->isStaticDataMember() &&
1149  "PARM_VAR_DECL can't be static data member");
1150 }
1151 
1153  // Record the number of bindings first to simplify deserialization.
1154  Record.push_back(D->bindings().size());
1155 
1156  VisitVarDecl(D);
1157  for (auto *B : D->bindings())
1158  Record.AddDeclRef(B);
1160 }
1161 
1163  VisitValueDecl(D);
1164  Record.AddStmt(D->getBinding());
1166 }
1167 
1169  VisitDecl(D);
1170  Record.AddStmt(D->getAsmString());
1171  Record.AddSourceLocation(D->getRParenLoc());
1173 }
1174 
1176  VisitDecl(D);
1177  Record.AddStmt(D->getStmt());
1179 }
1180 
1182  VisitDecl(D);
1184 }
1185 
1188  VisitDecl(D);
1189  Record.AddDeclRef(D->getExtendingDecl());
1190  Record.AddStmt(D->getTemporaryExpr());
1191  Record.push_back(static_cast<bool>(D->getValue()));
1192  if (D->getValue())
1193  Record.AddAPValue(*D->getValue());
1194  Record.push_back(D->getManglingNumber());
1196 }
1198  VisitDecl(D);
1199  Record.AddStmt(D->getBody());
1200  Record.AddTypeSourceInfo(D->getSignatureAsWritten());
1201  Record.push_back(D->param_size());
1202  for (ParmVarDecl *P : D->parameters())
1203  Record.AddDeclRef(P);
1204  Record.push_back(D->isVariadic());
1205  Record.push_back(D->blockMissingReturnType());
1206  Record.push_back(D->isConversionFromLambda());
1207  Record.push_back(D->doesNotEscape());
1208  Record.push_back(D->canAvoidCopyToHeap());
1209  Record.push_back(D->capturesCXXThis());
1210  Record.push_back(D->getNumCaptures());
1211  for (const auto &capture : D->captures()) {
1212  Record.AddDeclRef(capture.getVariable());
1213 
1214  unsigned flags = 0;
1215  if (capture.isByRef()) flags |= 1;
1216  if (capture.isNested()) flags |= 2;
1217  if (capture.hasCopyExpr()) flags |= 4;
1218  Record.push_back(flags);
1219 
1220  if (capture.hasCopyExpr()) Record.AddStmt(capture.getCopyExpr());
1221  }
1222 
1224 }
1225 
1227  Record.push_back(CD->getNumParams());
1228  VisitDecl(CD);
1229  Record.push_back(CD->getContextParamPosition());
1230  Record.push_back(CD->isNothrow() ? 1 : 0);
1231  // Body is stored by VisitCapturedStmt.
1232  for (unsigned I = 0; I < CD->getNumParams(); ++I)
1233  Record.AddDeclRef(CD->getParam(I));
1235 }
1236 
1238  VisitDecl(D);
1239  Record.push_back(D->getLanguage());
1240  Record.AddSourceLocation(D->getExternLoc());
1241  Record.AddSourceLocation(D->getRBraceLoc());
1243 }
1244 
1246  VisitDecl(D);
1247  Record.AddSourceLocation(D->getRBraceLoc());
1249 }
1250 
1252  VisitNamedDecl(D);
1253  Record.AddSourceLocation(D->getBeginLoc());
1255 }
1256 
1257 
1259  VisitRedeclarable(D);
1260  VisitNamedDecl(D);
1261  Record.push_back(D->isInline());
1262  Record.push_back(D->isNested());
1263  Record.AddSourceLocation(D->getBeginLoc());
1264  Record.AddSourceLocation(D->getRBraceLoc());
1265 
1266  if (D->isOriginalNamespace())
1267  Record.AddDeclRef(D->getAnonymousNamespace());
1269 
1270  if (Writer.hasChain() && D->isAnonymousNamespace() &&
1271  D == D->getMostRecentDecl()) {
1272  // This is a most recent reopening of the anonymous namespace. If its parent
1273  // is in a previous PCH (or is the TU), mark that parent for update, because
1274  // the original namespace always points to the latest re-opening of its
1275  // anonymous namespace.
1276  Decl *Parent = cast<Decl>(
1278  if (Parent->isFromASTFile() || isa<TranslationUnitDecl>(Parent)) {
1279  Writer.DeclUpdates[Parent].push_back(
1280  ASTWriter::DeclUpdate(UPD_CXX_ADDED_ANONYMOUS_NAMESPACE, D));
1281  }
1282  }
1283 }
1284 
1286  VisitRedeclarable(D);
1287  VisitNamedDecl(D);
1288  Record.AddSourceLocation(D->getNamespaceLoc());
1289  Record.AddSourceLocation(D->getTargetNameLoc());
1290  Record.AddNestedNameSpecifierLoc(D->getQualifierLoc());
1291  Record.AddDeclRef(D->getNamespace());
1293 }
1294 
1296  VisitNamedDecl(D);
1297  Record.AddSourceLocation(D->getUsingLoc());
1298  Record.AddNestedNameSpecifierLoc(D->getQualifierLoc());
1299  Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName());
1300  Record.AddDeclRef(D->FirstUsingShadow.getPointer());
1301  Record.push_back(D->hasTypename());
1302  Record.AddDeclRef(Context.getInstantiatedFromUsingDecl(D));
1304 }
1305 
1307  VisitNamedDecl(D);
1308  Record.AddSourceLocation(D->getUsingLoc());
1309  Record.AddSourceLocation(D->getEnumLoc());
1310  Record.AddTypeSourceInfo(D->getEnumType());
1311  Record.AddDeclRef(D->FirstUsingShadow.getPointer());
1312  Record.AddDeclRef(Context.getInstantiatedFromUsingEnumDecl(D));
1314 }
1315 
1317  Record.push_back(D->NumExpansions);
1318  VisitNamedDecl(D);
1319  Record.AddDeclRef(D->getInstantiatedFromUsingDecl());
1320  for (auto *E : D->expansions())
1321  Record.AddDeclRef(E);
1323 }
1324 
1326  VisitRedeclarable(D);
1327  VisitNamedDecl(D);
1328  Record.AddDeclRef(D->getTargetDecl());
1329  Record.push_back(D->getIdentifierNamespace());
1330  Record.AddDeclRef(D->UsingOrNextShadow);
1331  Record.AddDeclRef(Context.getInstantiatedFromUsingShadowDecl(D));
1333 }
1334 
1337  VisitUsingShadowDecl(D);
1338  Record.AddDeclRef(D->NominatedBaseClassShadowDecl);
1339  Record.AddDeclRef(D->ConstructedBaseClassShadowDecl);
1340  Record.push_back(D->IsVirtual);
1342 }
1343 
1345  VisitNamedDecl(D);
1346  Record.AddSourceLocation(D->getUsingLoc());
1347  Record.AddSourceLocation(D->getNamespaceKeyLocation());
1348  Record.AddNestedNameSpecifierLoc(D->getQualifierLoc());
1349  Record.AddDeclRef(D->getNominatedNamespace());
1350  Record.AddDeclRef(dyn_cast<Decl>(D->getCommonAncestor()));
1352 }
1353 
1355  VisitValueDecl(D);
1356  Record.AddSourceLocation(D->getUsingLoc());
1357  Record.AddNestedNameSpecifierLoc(D->getQualifierLoc());
1358  Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName());
1359  Record.AddSourceLocation(D->getEllipsisLoc());
1361 }
1362 
1365  VisitTypeDecl(D);
1366  Record.AddSourceLocation(D->getTypenameLoc());
1367  Record.AddNestedNameSpecifierLoc(D->getQualifierLoc());
1368  Record.AddSourceLocation(D->getEllipsisLoc());
1370 }
1371 
1374  VisitNamedDecl(D);
1376 }
1377 
1379  VisitRecordDecl(D);
1380 
1381  enum {
1382  CXXRecNotTemplate = 0, CXXRecTemplate, CXXRecMemberSpecialization
1383  };
1384  if (ClassTemplateDecl *TemplD = D->getDescribedClassTemplate()) {
1385  Record.push_back(CXXRecTemplate);
1386  Record.AddDeclRef(TemplD);
1387  } else if (MemberSpecializationInfo *MSInfo
1388  = D->getMemberSpecializationInfo()) {
1389  Record.push_back(CXXRecMemberSpecialization);
1390  Record.AddDeclRef(MSInfo->getInstantiatedFrom());
1391  Record.push_back(MSInfo->getTemplateSpecializationKind());
1392  Record.AddSourceLocation(MSInfo->getPointOfInstantiation());
1393  } else {
1394  Record.push_back(CXXRecNotTemplate);
1395  }
1396 
1397  Record.push_back(D->isThisDeclarationADefinition());
1399  Record.AddCXXDefinitionData(D);
1400 
1401  // Store (what we currently believe to be) the key function to avoid
1402  // deserializing every method so we can compute it.
1403  if (D->isCompleteDefinition())
1404  Record.AddDeclRef(Context.getCurrentKeyFunction(D));
1405 
1407 }
1408 
1410  VisitFunctionDecl(D);
1411  if (D->isCanonicalDecl()) {
1412  Record.push_back(D->size_overridden_methods());
1413  for (const CXXMethodDecl *MD : D->overridden_methods())
1414  Record.AddDeclRef(MD);
1415  } else {
1416  // We only need to record overridden methods once for the canonical decl.
1417  Record.push_back(0);
1418  }
1419 
1420  if (D->getDeclContext() == D->getLexicalDeclContext() &&
1421  D->getFirstDecl() == D->getMostRecentDecl() && !D->isInvalidDecl() &&
1422  !D->hasAttrs() && !D->isTopLevelDeclInObjCContainer() &&
1424  !D->hasExtInfo() && !D->hasInheritedPrototype() &&
1425  D->hasWrittenPrototype() &&
1427  AbbrevToUse = Writer.getDeclCXXMethodAbbrev();
1428 
1430 }
1431 
1433  Record.push_back(D->getTrailingAllocKind());
1435  if (auto Inherited = D->getInheritedConstructor()) {
1436  Record.AddDeclRef(Inherited.getShadowDecl());
1437  Record.AddDeclRef(Inherited.getConstructor());
1438  }
1439 
1440  VisitCXXMethodDecl(D);
1442 }
1443 
1445  VisitCXXMethodDecl(D);
1446 
1447  Record.AddDeclRef(D->getOperatorDelete());
1448  if (D->getOperatorDelete())
1449  Record.AddStmt(D->getOperatorDeleteThisArg());
1450 
1452 }
1453 
1456  VisitCXXMethodDecl(D);
1458 }
1459 
1461  VisitDecl(D);
1462  Record.push_back(Writer.getSubmoduleID(D->getImportedModule()));
1463  ArrayRef<SourceLocation> IdentifierLocs = D->getIdentifierLocs();
1464  Record.push_back(!IdentifierLocs.empty());
1465  if (IdentifierLocs.empty()) {
1466  Record.AddSourceLocation(D->getEndLoc());
1467  Record.push_back(1);
1468  } else {
1469  for (unsigned I = 0, N = IdentifierLocs.size(); I != N; ++I)
1470  Record.AddSourceLocation(IdentifierLocs[I]);
1471  Record.push_back(IdentifierLocs.size());
1472  }
1473  // Note: the number of source locations must always be the last element in
1474  // the record.
1476 }
1477 
1479  VisitDecl(D);
1480  Record.AddSourceLocation(D->getColonLoc());
1482 }
1483 
1485  // Record the number of friend type template parameter lists here
1486  // so as to simplify memory allocation during deserialization.
1487  Record.push_back(D->NumTPLists);
1488  VisitDecl(D);
1489  bool hasFriendDecl = D->Friend.is<NamedDecl*>();
1490  Record.push_back(hasFriendDecl);
1491  if (hasFriendDecl)
1492  Record.AddDeclRef(D->getFriendDecl());
1493  else
1494  Record.AddTypeSourceInfo(D->getFriendType());
1495  for (unsigned i = 0; i < D->NumTPLists; ++i)
1496  Record.AddTemplateParameterList(D->getFriendTypeTemplateParameterList(i));
1497  Record.AddDeclRef(D->getNextFriend());
1498  Record.push_back(D->UnsupportedFriend);
1499  Record.AddSourceLocation(D->FriendLoc);
1501 }
1502 
1504  VisitDecl(D);
1505  Record.push_back(D->getNumTemplateParameters());
1506  for (unsigned i = 0, e = D->getNumTemplateParameters(); i != e; ++i)
1507  Record.AddTemplateParameterList(D->getTemplateParameterList(i));
1508  Record.push_back(D->getFriendDecl() != nullptr);
1509  if (D->getFriendDecl())
1510  Record.AddDeclRef(D->getFriendDecl());
1511  else
1512  Record.AddTypeSourceInfo(D->getFriendType());
1513  Record.AddSourceLocation(D->getFriendLoc());
1515 }
1516 
1518  VisitNamedDecl(D);
1519 
1520  Record.AddTemplateParameterList(D->getTemplateParameters());
1521  Record.AddDeclRef(D->getTemplatedDecl());
1522 }
1523 
1525  VisitTemplateDecl(D);
1526  Record.AddStmt(D->getConstraintExpr());
1528 }
1529 
1532  Record.push_back(D->getTemplateArguments().size());
1533  VisitDecl(D);
1534  for (const TemplateArgument &Arg : D->getTemplateArguments())
1535  Record.AddTemplateArgument(Arg);
1537 }
1538 
1541 }
1542 
1544  VisitRedeclarable(D);
1545 
1546  // Emit data to initialize CommonOrPrev before VisitTemplateDecl so that
1547  // getCommonPtr() can be used while this is still initializing.
1548  if (D->isFirstDecl()) {
1549  // This declaration owns the 'common' pointer, so serialize that data now.
1550  Record.AddDeclRef(D->getInstantiatedFromMemberTemplate());
1552  Record.push_back(D->isMemberSpecialization());
1553  }
1554 
1555  VisitTemplateDecl(D);
1556  Record.push_back(D->getIdentifierNamespace());
1557 }
1558 
1560  VisitRedeclarableTemplateDecl(D);
1561 
1562  if (D->isFirstDecl())
1563  AddTemplateSpecializations(D);
1565 }
1566 
1569  RegisterTemplateSpecialization(D->getSpecializedTemplate(), D);
1570 
1571  VisitCXXRecordDecl(D);
1572 
1573  llvm::PointerUnion<ClassTemplateDecl *,
1576  if (Decl *InstFromD = InstFrom.dyn_cast<ClassTemplateDecl *>()) {
1577  Record.AddDeclRef(InstFromD);
1578  } else {
1579  Record.AddDeclRef(InstFrom.get<ClassTemplatePartialSpecializationDecl *>());
1580  Record.AddTemplateArgumentList(&D->getTemplateInstantiationArgs());
1581  }
1582 
1583  Record.AddTemplateArgumentList(&D->getTemplateArgs());
1584  Record.AddSourceLocation(D->getPointOfInstantiation());
1585  Record.push_back(D->getSpecializationKind());
1586  Record.push_back(D->isCanonicalDecl());
1587 
1588  if (D->isCanonicalDecl()) {
1589  // When reading, we'll add it to the folding set of the following template.
1590  Record.AddDeclRef(D->getSpecializedTemplate()->getCanonicalDecl());
1591  }
1592 
1593  // Explicit info.
1594  Record.AddTypeSourceInfo(D->getTypeAsWritten());
1595  if (D->getTypeAsWritten()) {
1596  Record.AddSourceLocation(D->getExternLoc());
1597  Record.AddSourceLocation(D->getTemplateKeywordLoc());
1598  }
1599 
1601 }
1602 
1605  Record.AddTemplateParameterList(D->getTemplateParameters());
1606  Record.AddASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
1607 
1608  VisitClassTemplateSpecializationDecl(D);
1609 
1610  // These are read/set from/to the first declaration.
1611  if (D->getPreviousDecl() == nullptr) {
1612  Record.AddDeclRef(D->getInstantiatedFromMember());
1613  Record.push_back(D->isMemberSpecialization());
1614  }
1615 
1617 }
1618 
1620  VisitRedeclarableTemplateDecl(D);
1621 
1622  if (D->isFirstDecl())
1623  AddTemplateSpecializations(D);
1625 }
1626 
1629  RegisterTemplateSpecialization(D->getSpecializedTemplate(), D);
1630 
1631  llvm::PointerUnion<VarTemplateDecl *, VarTemplatePartialSpecializationDecl *>
1632  InstFrom = D->getSpecializedTemplateOrPartial();
1633  if (Decl *InstFromD = InstFrom.dyn_cast<VarTemplateDecl *>()) {
1634  Record.AddDeclRef(InstFromD);
1635  } else {
1636  Record.AddDeclRef(InstFrom.get<VarTemplatePartialSpecializationDecl *>());
1637  Record.AddTemplateArgumentList(&D->getTemplateInstantiationArgs());
1638  }
1639 
1640  // Explicit info.
1641  Record.AddTypeSourceInfo(D->getTypeAsWritten());
1642  if (D->getTypeAsWritten()) {
1643  Record.AddSourceLocation(D->getExternLoc());
1644  Record.AddSourceLocation(D->getTemplateKeywordLoc());
1645  }
1646 
1647  Record.AddTemplateArgumentList(&D->getTemplateArgs());
1648  Record.AddSourceLocation(D->getPointOfInstantiation());
1649  Record.push_back(D->getSpecializationKind());
1650  Record.push_back(D->IsCompleteDefinition);
1651 
1652  VisitVarDecl(D);
1653 
1654  Record.push_back(D->isCanonicalDecl());
1655 
1656  if (D->isCanonicalDecl()) {
1657  // When reading, we'll add it to the folding set of the following template.
1658  Record.AddDeclRef(D->getSpecializedTemplate()->getCanonicalDecl());
1659  }
1660 
1662 }
1663 
1666  Record.AddTemplateParameterList(D->getTemplateParameters());
1667  Record.AddASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
1668 
1669  VisitVarTemplateSpecializationDecl(D);
1670 
1671  // These are read/set from/to the first declaration.
1672  if (D->getPreviousDecl() == nullptr) {
1673  Record.AddDeclRef(D->getInstantiatedFromMember());
1674  Record.push_back(D->isMemberSpecialization());
1675  }
1676 
1678 }
1679 
1682  VisitDecl(D);
1683  Record.AddDeclRef(D->getSpecialization());
1684  Record.push_back(D->hasExplicitTemplateArgs());
1685  if (D->hasExplicitTemplateArgs())
1686  Record.AddASTTemplateArgumentListInfo(D->getTemplateArgsAsWritten());
1688 }
1689 
1690 
1692  VisitRedeclarableTemplateDecl(D);
1693 
1694  if (D->isFirstDecl())
1695  AddTemplateSpecializations(D);
1697 }
1698 
1700  Record.push_back(D->hasTypeConstraint());
1701  VisitTypeDecl(D);
1702 
1703  Record.push_back(D->wasDeclaredWithTypename());
1704 
1705  const TypeConstraint *TC = D->getTypeConstraint();
1706  Record.push_back(TC != nullptr);
1707  if (TC) {
1708  Record.AddNestedNameSpecifierLoc(TC->getNestedNameSpecifierLoc());
1709  Record.AddDeclarationNameInfo(TC->getConceptNameInfo());
1710  Record.AddDeclRef(TC->getNamedConcept());
1711  Record.push_back(TC->getTemplateArgsAsWritten() != nullptr);
1712  if (TC->getTemplateArgsAsWritten())
1713  Record.AddASTTemplateArgumentListInfo(TC->getTemplateArgsAsWritten());
1714  Record.AddStmt(TC->getImmediatelyDeclaredConstraint());
1715  Record.push_back(D->isExpandedParameterPack());
1716  if (D->isExpandedParameterPack())
1717  Record.push_back(D->getNumExpansionParameters());
1718  }
1719 
1720  bool OwnsDefaultArg = D->hasDefaultArgument() &&
1722  Record.push_back(OwnsDefaultArg);
1723  if (OwnsDefaultArg)
1724  Record.AddTypeSourceInfo(D->getDefaultArgumentInfo());
1725 
1727 }
1728 
1730  // For an expanded parameter pack, record the number of expansion types here
1731  // so that it's easier for deserialization to allocate the right amount of
1732  // memory.
1734  Record.push_back(!!TypeConstraint);
1735  if (D->isExpandedParameterPack())
1736  Record.push_back(D->getNumExpansionTypes());
1737 
1738  VisitDeclaratorDecl(D);
1739  // TemplateParmPosition.
1740  Record.push_back(D->getDepth());
1741  Record.push_back(D->getPosition());
1742  if (TypeConstraint)
1743  Record.AddStmt(TypeConstraint);
1744 
1745  if (D->isExpandedParameterPack()) {
1746  for (unsigned I = 0, N = D->getNumExpansionTypes(); I != N; ++I) {
1747  Record.AddTypeRef(D->getExpansionType(I));
1748  Record.AddTypeSourceInfo(D->getExpansionTypeSourceInfo(I));
1749  }
1750 
1752  } else {
1753  // Rest of NonTypeTemplateParmDecl.
1754  Record.push_back(D->isParameterPack());
1755  bool OwnsDefaultArg = D->hasDefaultArgument() &&
1757  Record.push_back(OwnsDefaultArg);
1758  if (OwnsDefaultArg)
1759  Record.AddStmt(D->getDefaultArgument());
1761  }
1762 }
1763 
1765  // For an expanded parameter pack, record the number of expansion types here
1766  // so that it's easier for deserialization to allocate the right amount of
1767  // memory.
1768  if (D->isExpandedParameterPack())
1769  Record.push_back(D->getNumExpansionTemplateParameters());
1770 
1771  VisitTemplateDecl(D);
1772  // TemplateParmPosition.
1773  Record.push_back(D->getDepth());
1774  Record.push_back(D->getPosition());
1775 
1776  if (D->isExpandedParameterPack()) {
1777  for (unsigned I = 0, N = D->getNumExpansionTemplateParameters();
1778  I != N; ++I)
1779  Record.AddTemplateParameterList(D->getExpansionTemplateParameters(I));
1781  } else {
1782  // Rest of TemplateTemplateParmDecl.
1783  Record.push_back(D->isParameterPack());
1784  bool OwnsDefaultArg = D->hasDefaultArgument() &&
1786  Record.push_back(OwnsDefaultArg);
1787  if (OwnsDefaultArg)
1788  Record.AddTemplateArgumentLoc(D->getDefaultArgument());
1790  }
1791 }
1792 
1794  VisitRedeclarableTemplateDecl(D);
1796 }
1797 
1799  VisitDecl(D);
1800  Record.AddStmt(D->getAssertExpr());
1801  Record.push_back(D->isFailed());
1802  Record.AddStmt(D->getMessage());
1803  Record.AddSourceLocation(D->getRParenLoc());
1805 }
1806 
1807 /// Emit the DeclContext part of a declaration context decl.
1809  Record.AddOffset(Writer.WriteDeclContextLexicalBlock(Context, DC));
1810  Record.AddOffset(Writer.WriteDeclContextVisibleBlock(Context, DC));
1811 }
1812 
1814  assert(IsLocalDecl(D) && "expected a local declaration");
1815 
1816  const Decl *Canon = D->getCanonicalDecl();
1817  if (IsLocalDecl(Canon))
1818  return Canon;
1819 
1820  const Decl *&CacheEntry = FirstLocalDeclCache[Canon];
1821  if (CacheEntry)
1822  return CacheEntry;
1823 
1824  for (const Decl *Redecl = D; Redecl; Redecl = Redecl->getPreviousDecl())
1825  if (IsLocalDecl(Redecl))
1826  D = Redecl;
1827  return CacheEntry = D;
1828 }
1829 
1830 template <typename T>
1832  T *First = D->getFirstDecl();
1833  T *MostRecent = First->getMostRecentDecl();
1834  T *DAsT = static_cast<T *>(D);
1835  if (MostRecent != First) {
1836  assert(isRedeclarableDeclKind(DAsT->getKind()) &&
1837  "Not considered redeclarable?");
1838 
1839  Record.AddDeclRef(First);
1840 
1841  // Write out a list of local redeclarations of this declaration if it's the
1842  // first local declaration in the chain.
1843  const Decl *FirstLocal = Writer.getFirstLocalDecl(DAsT);
1844  if (DAsT == FirstLocal) {
1845  // Emit a list of all imported first declarations so that we can be sure
1846  // that all redeclarations visible to this module are before D in the
1847  // redecl chain.
1848  unsigned I = Record.size();
1849  Record.push_back(0);
1850  if (Writer.Chain)
1851  AddFirstDeclFromEachModule(DAsT, /*IncludeLocal*/false);
1852  // This is the number of imported first declarations + 1.
1853  Record[I] = Record.size() - I;
1854 
1855  // Collect the set of local redeclarations of this declaration, from
1856  // newest to oldest.
1857  ASTWriter::RecordData LocalRedecls;
1858  ASTRecordWriter LocalRedeclWriter(Record, LocalRedecls);
1859  for (const Decl *Prev = FirstLocal->getMostRecentDecl();
1860  Prev != FirstLocal; Prev = Prev->getPreviousDecl())
1861  if (!Prev->isFromASTFile())
1862  LocalRedeclWriter.AddDeclRef(Prev);
1863 
1864  // If we have any redecls, write them now as a separate record preceding
1865  // the declaration itself.
1866  if (LocalRedecls.empty())
1867  Record.push_back(0);
1868  else
1869  Record.AddOffset(LocalRedeclWriter.Emit(LOCAL_REDECLARATIONS));
1870  } else {
1871  Record.push_back(0);
1872  Record.AddDeclRef(FirstLocal);
1873  }
1874 
1875  // Make sure that we serialize both the previous and the most-recent
1876  // declarations, which (transitively) ensures that all declarations in the
1877  // chain get serialized.
1878  //
1879  // FIXME: This is not correct; when we reach an imported declaration we
1880  // won't emit its previous declaration.
1881  (void)Writer.GetDeclRef(D->getPreviousDecl());
1882  (void)Writer.GetDeclRef(MostRecent);
1883  } else {
1884  // We use the sentinel value 0 to indicate an only declaration.
1885  Record.push_back(0);
1886  }
1887 }
1888 
1890  VisitNamedDecl(D);
1891  VisitDeclContext(D);
1892  Record.push_back(D->isCBuffer());
1893  Record.AddSourceLocation(D->getLocStart());
1894  Record.AddSourceLocation(D->getLBraceLoc());
1895  Record.AddSourceLocation(D->getRBraceLoc());
1896 
1898 }
1899 
1901  Record.writeOMPChildren(D->Data);
1902  VisitDecl(D);
1904 }
1905 
1907  Record.writeOMPChildren(D->Data);
1908  VisitDecl(D);
1910 }
1911 
1913  Record.writeOMPChildren(D->Data);
1914  VisitDecl(D);
1916 }
1917 
1919  VisitValueDecl(D);
1920  Record.AddSourceLocation(D->getBeginLoc());
1921  Record.AddStmt(D->getCombinerIn());
1922  Record.AddStmt(D->getCombinerOut());
1923  Record.AddStmt(D->getCombiner());
1924  Record.AddStmt(D->getInitOrig());
1925  Record.AddStmt(D->getInitPriv());
1926  Record.AddStmt(D->getInitializer());
1927  Record.push_back(D->getInitializerKind());
1928  Record.AddDeclRef(D->getPrevDeclInScope());
1930 }
1931 
1933  Record.writeOMPChildren(D->Data);
1934  VisitValueDecl(D);
1935  Record.AddDeclarationName(D->getVarName());
1936  Record.AddDeclRef(D->getPrevDeclInScope());
1938 }
1939 
1941  VisitVarDecl(D);
1943 }
1944 
1945 //===----------------------------------------------------------------------===//
1946 // ASTWriter Implementation
1947 //===----------------------------------------------------------------------===//
1948 
1949 void ASTWriter::WriteDeclAbbrevs() {
1950  using namespace llvm;
1951 
1952  std::shared_ptr<BitCodeAbbrev> Abv;
1953 
1954  // Abbreviation for DECL_FIELD
1955  Abv = std::make_shared<BitCodeAbbrev>();
1956  Abv->Add(BitCodeAbbrevOp(serialization::DECL_FIELD));
1957  // Decl
1958  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
1959  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
1960  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
1961  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
1962  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
1963  Abv->Add(BitCodeAbbrevOp(0)); // isUsed
1964  Abv->Add(BitCodeAbbrevOp(0)); // isReferenced
1965  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
1966  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // AccessSpecifier
1967  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
1968  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
1969  // NamedDecl
1970  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
1971  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
1972  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
1973  // ValueDecl
1974  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
1975  // DeclaratorDecl
1976  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // InnerStartLoc
1977  Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
1978  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TSIType
1979  // FieldDecl
1980  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isMutable
1981  Abv->Add(BitCodeAbbrevOp(0)); // InitStyle
1982  // Type Source Info
1983  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
1984  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypeLoc
1985  DeclFieldAbbrev = Stream.EmitAbbrev(std::move(Abv));
1986 
1987  // Abbreviation for DECL_OBJC_IVAR
1988  Abv = std::make_shared<BitCodeAbbrev>();
1989  Abv->Add(BitCodeAbbrevOp(serialization::DECL_OBJC_IVAR));
1990  // Decl
1991  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
1992  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
1993  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
1994  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
1995  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
1996  Abv->Add(BitCodeAbbrevOp(0)); // isUsed
1997  Abv->Add(BitCodeAbbrevOp(0)); // isReferenced
1998  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
1999  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // AccessSpecifier
2000  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2001  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2002  // NamedDecl
2003  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
2004  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
2005  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2006  // ValueDecl
2007  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2008  // DeclaratorDecl
2009  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // InnerStartLoc
2010  Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
2011  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TSIType
2012  // FieldDecl
2013  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isMutable
2014  Abv->Add(BitCodeAbbrevOp(0)); // InitStyle
2015  // ObjC Ivar
2016  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getAccessControl
2017  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getSynthesize
2018  // Type Source Info
2019  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2020  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypeLoc
2021  DeclObjCIvarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2022 
2023  // Abbreviation for DECL_ENUM
2024  Abv = std::make_shared<BitCodeAbbrev>();
2025  Abv->Add(BitCodeAbbrevOp(serialization::DECL_ENUM));
2026  // Redeclarable
2027  Abv->Add(BitCodeAbbrevOp(0)); // No redeclaration
2028  // Decl
2029  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
2030  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
2031  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
2032  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
2033  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
2034  Abv->Add(BitCodeAbbrevOp(0)); // isUsed
2035  Abv->Add(BitCodeAbbrevOp(0)); // isReferenced
2036  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
2037  Abv->Add(BitCodeAbbrevOp(AS_none)); // C++ AccessSpecifier
2038  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2039  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2040  // NamedDecl
2041  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
2042  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
2043  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2044  // TypeDecl
2045  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Source Location
2046  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type Ref
2047  // TagDecl
2048  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // IdentifierNamespace
2049  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getTagKind
2050  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isCompleteDefinition
2051  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // EmbeddedInDeclarator
2052  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsFreeStanding
2053  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsCompleteDefinitionRequired
2054  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SourceLocation
2055  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SourceLocation
2056  Abv->Add(BitCodeAbbrevOp(0)); // ExtInfoKind
2057  // EnumDecl
2058  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // AddTypeRef
2059  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // IntegerType
2060  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getPromotionType
2061  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getNumPositiveBits
2062  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getNumNegativeBits
2063  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isScoped
2064  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isScopedUsingClassTag
2065  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isFixed
2066  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));// ODRHash
2067  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // InstantiatedMembEnum
2068  // DC
2069  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LexicalOffset
2070  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // VisibleOffset
2071  DeclEnumAbbrev = Stream.EmitAbbrev(std::move(Abv));
2072 
2073  // Abbreviation for DECL_RECORD
2074  Abv = std::make_shared<BitCodeAbbrev>();
2075  Abv->Add(BitCodeAbbrevOp(serialization::DECL_RECORD));
2076  // Redeclarable
2077  Abv->Add(BitCodeAbbrevOp(0)); // No redeclaration
2078  // Decl
2079  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
2080  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
2081  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
2082  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
2083  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
2084  Abv->Add(BitCodeAbbrevOp(0)); // isUsed
2085  Abv->Add(BitCodeAbbrevOp(0)); // isReferenced
2086  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
2087  Abv->Add(BitCodeAbbrevOp(AS_none)); // C++ AccessSpecifier
2088  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2089  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2090  // NamedDecl
2091  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
2092  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
2093  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2094  // TypeDecl
2095  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Source Location
2096  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type Ref
2097  // TagDecl
2098  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // IdentifierNamespace
2099  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getTagKind
2100  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isCompleteDefinition
2101  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // EmbeddedInDeclarator
2102  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsFreeStanding
2103  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsCompleteDefinitionRequired
2104  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SourceLocation
2105  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SourceLocation
2106  Abv->Add(BitCodeAbbrevOp(0)); // ExtInfoKind
2107  // RecordDecl
2108  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // FlexibleArrayMember
2109  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // AnonymousStructUnion
2110  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // hasObjectMember
2111  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // hasVolatileMember
2112 
2113  // isNonTrivialToPrimitiveDefaultInitialize
2114  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2115  // isNonTrivialToPrimitiveCopy
2116  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2117  // isNonTrivialToPrimitiveDestroy
2118  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2119  // hasNonTrivialToPrimitiveDefaultInitializeCUnion
2120  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2121  // hasNonTrivialToPrimitiveDestructCUnion
2122  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2123  // hasNonTrivialToPrimitiveCopyCUnion
2124  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2125  // isParamDestroyedInCallee
2126  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2127  // getArgPassingRestrictions
2128  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2129 
2130  // DC
2131  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LexicalOffset
2132  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // VisibleOffset
2133  DeclRecordAbbrev = Stream.EmitAbbrev(std::move(Abv));
2134 
2135  // Abbreviation for DECL_PARM_VAR
2136  Abv = std::make_shared<BitCodeAbbrev>();
2137  Abv->Add(BitCodeAbbrevOp(serialization::DECL_PARM_VAR));
2138  // Redeclarable
2139  Abv->Add(BitCodeAbbrevOp(0)); // No redeclaration
2140  // Decl
2141  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
2142  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
2143  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
2144  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
2145  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
2146  Abv->Add(BitCodeAbbrevOp(0)); // isUsed
2147  Abv->Add(BitCodeAbbrevOp(0)); // isReferenced
2148  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
2149  Abv->Add(BitCodeAbbrevOp(AS_none)); // C++ AccessSpecifier
2150  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2151  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2152  // NamedDecl
2153  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
2154  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
2155  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2156  // ValueDecl
2157  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2158  // DeclaratorDecl
2159  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // InnerStartLoc
2160  Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
2161  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TSIType
2162  // VarDecl
2163  Abv->Add(BitCodeAbbrevOp(0)); // SClass
2164  Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec
2165  Abv->Add(BitCodeAbbrevOp(0)); // InitStyle
2166  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong
2167  Abv->Add(BitCodeAbbrevOp(0)); // Linkage
2168  Abv->Add(BitCodeAbbrevOp(0)); // HasInit
2169  Abv->Add(BitCodeAbbrevOp(0)); // HasMemberSpecializationInfo
2170  // ParmVarDecl
2171  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsObjCMethodParameter
2172  Abv->Add(BitCodeAbbrevOp(0)); // ScopeDepth
2173  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // ScopeIndex
2174  Abv->Add(BitCodeAbbrevOp(0)); // ObjCDeclQualifier
2175  Abv->Add(BitCodeAbbrevOp(0)); // KNRPromoted
2176  Abv->Add(BitCodeAbbrevOp(0)); // HasInheritedDefaultArg
2177  Abv->Add(BitCodeAbbrevOp(0)); // HasUninstantiatedDefaultArg
2178  // Type Source Info
2179  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2180  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypeLoc
2181  DeclParmVarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2182 
2183  // Abbreviation for DECL_TYPEDEF
2184  Abv = std::make_shared<BitCodeAbbrev>();
2185  Abv->Add(BitCodeAbbrevOp(serialization::DECL_TYPEDEF));
2186  // Redeclarable
2187  Abv->Add(BitCodeAbbrevOp(0)); // No redeclaration
2188  // Decl
2189  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
2190  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
2191  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
2192  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
2193  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
2194  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isUsed
2195  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isReferenced
2196  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
2197  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // C++ AccessSpecifier
2198  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2199  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2200  // NamedDecl
2201  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
2202  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
2203  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2204  // TypeDecl
2205  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Source Location
2206  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type Ref
2207  // TypedefDecl
2208  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2209  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypeLoc
2210  DeclTypedefAbbrev = Stream.EmitAbbrev(std::move(Abv));
2211 
2212  // Abbreviation for DECL_VAR
2213  Abv = std::make_shared<BitCodeAbbrev>();
2214  Abv->Add(BitCodeAbbrevOp(serialization::DECL_VAR));
2215  // Redeclarable
2216  Abv->Add(BitCodeAbbrevOp(0)); // No redeclaration
2217  // Decl
2218  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
2219  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
2220  Abv->Add(BitCodeAbbrevOp(0)); // isInvalidDecl
2221  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
2222  Abv->Add(BitCodeAbbrevOp(0)); // isImplicit
2223  Abv->Add(BitCodeAbbrevOp(0)); // isUsed
2224  Abv->Add(BitCodeAbbrevOp(0)); // isReferenced
2225  Abv->Add(BitCodeAbbrevOp(0)); // TopLevelDeclInObjCContainer
2226  Abv->Add(BitCodeAbbrevOp(AS_none)); // C++ AccessSpecifier
2227  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2228  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2229  // NamedDecl
2230  Abv->Add(BitCodeAbbrevOp(0)); // NameKind = Identifier
2231  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Name
2232  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2233  // ValueDecl
2234  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2235  // DeclaratorDecl
2236  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // InnerStartLoc
2237  Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
2238  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TSIType
2239  // VarDecl
2240  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // SClass
2241  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // TSCSpec
2242  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // InitStyle
2243  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong
2244  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsThisDeclarationADemotedDefinition
2245  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isExceptionVariable
2246  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isNRVOVariable
2247  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isCXXForRangeDecl
2248  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isObjCForDecl
2249  Abv->Add(BitCodeAbbrevOp(0)); // isInline
2250  Abv->Add(BitCodeAbbrevOp(0)); // isInlineSpecified
2251  Abv->Add(BitCodeAbbrevOp(0)); // isConstexpr
2252  Abv->Add(BitCodeAbbrevOp(0)); // isInitCapture
2253  Abv->Add(BitCodeAbbrevOp(0)); // isPrevDeclInSameScope
2254  Abv->Add(BitCodeAbbrevOp(0)); // ImplicitParamKind
2255  Abv->Add(BitCodeAbbrevOp(0)); // EscapingByref
2256  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // Linkage
2257  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // HasConstant*
2258  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // VarKind (local enum)
2259  // Type Source Info
2260  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2261  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypeLoc
2262  DeclVarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2263 
2264  // Abbreviation for DECL_CXX_METHOD
2265  Abv = std::make_shared<BitCodeAbbrev>();
2266  Abv->Add(BitCodeAbbrevOp(serialization::DECL_CXX_METHOD));
2267  // RedeclarableDecl
2268  Abv->Add(BitCodeAbbrevOp(0)); // CanonicalDecl
2269  // FIXME: Implement abbreviation for other template kinds.
2270  Abv->Add(BitCodeAbbrevOp(FunctionDecl::TK_NonTemplate)); // TemplateKind
2271  // Decl
2272  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext
2273  Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext
2274  Abv->Add(BitCodeAbbrevOp(0)); // Invalid
2275  Abv->Add(BitCodeAbbrevOp(0)); // HasAttrs
2276  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Implicit
2277  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Used
2278  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Referenced
2279  Abv->Add(BitCodeAbbrevOp(0)); // InObjCContainer
2280  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // Access
2281  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // ModuleOwnershipKind
2282  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SubmoduleID
2283  // NamedDecl
2284  Abv->Add(BitCodeAbbrevOp(DeclarationName::Identifier)); // NameKind
2285  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Identifier
2286  Abv->Add(BitCodeAbbrevOp(0)); // AnonDeclNumber
2287  // ValueDecl
2288  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2289  // DeclaratorDecl
2290  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // InnerLocStart
2291  Abv->Add(BitCodeAbbrevOp(0)); // HasExtInfo
2292  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TSIType
2293  // FunctionDecl
2294  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 11)); // IDNS
2295  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // StorageClass
2296  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Inline
2297  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // InlineSpecified
2298  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // VirtualAsWritten
2299  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Pure
2300  Abv->Add(BitCodeAbbrevOp(0)); // HasInheritedProto
2301  Abv->Add(BitCodeAbbrevOp(1)); // HasWrittenProto
2302  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Deleted
2303  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Trivial
2304  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // TrivialForCall
2305  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // Defaulted
2306  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ExplicitlyDefaulted
2307  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // ImplicitReturnZero
2308  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // Constexpr
2309  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // UsesSEHTry
2310  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // SkippedBody
2311  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // MultiVersion
2312  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // LateParsed
2313  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // FriendConstraintRefersToEnclosingTemplate
2314  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // Linkage
2315  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // LocEnd
2316  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Default
2317  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // ODRHash
2318  // This Array slurps the rest of the record. Fortunately we want to encode
2319  // (nearly) all the remaining (variable number of) fields in the same way.
2320  //
2321  // This is:
2322  // NumParams and Params[] from FunctionDecl, and
2323  // NumOverriddenMethods, OverriddenMethods[] from CXXMethodDecl.
2324  //
2325  // Add an AbbrevOp for 'size then elements' and use it here.
2326  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2327  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2328  DeclCXXMethodAbbrev = Stream.EmitAbbrev(std::move(Abv));
2329 
2330  unsigned ExprDependenceBits = llvm::BitWidth<ExprDependence>;
2331  // Abbreviation for EXPR_DECL_REF
2332  Abv = std::make_shared<BitCodeAbbrev>();
2333  Abv->Add(BitCodeAbbrevOp(serialization::EXPR_DECL_REF));
2334  //Stmt
2335  // Expr
2336  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2337  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2338  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetValueKind
2339  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetObjectKind
2340  //DeclRefExpr
2341  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); //HasQualifier
2342  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); //GetDeclFound
2343  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); //ExplicitTemplateArgs
2344  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); //HadMultipleCandidates
2345  Abv->Add(BitCodeAbbrevOp(0)); // RefersToEnclosingVariableOrCapture
2346  Abv->Add(BitCodeAbbrevOp(0)); // NonOdrUseReason
2347  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclRef
2348  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Location
2349  DeclRefExprAbbrev = Stream.EmitAbbrev(std::move(Abv));
2350 
2351  // Abbreviation for EXPR_INTEGER_LITERAL
2352  Abv = std::make_shared<BitCodeAbbrev>();
2353  Abv->Add(BitCodeAbbrevOp(serialization::EXPR_INTEGER_LITERAL));
2354  //Stmt
2355  // Expr
2356  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2357  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2358  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetValueKind
2359  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetObjectKind
2360  //Integer Literal
2361  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Location
2362  Abv->Add(BitCodeAbbrevOp(32)); // Bit Width
2363  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Value
2364  IntegerLiteralAbbrev = Stream.EmitAbbrev(std::move(Abv));
2365 
2366  // Abbreviation for EXPR_CHARACTER_LITERAL
2367  Abv = std::make_shared<BitCodeAbbrev>();
2368  Abv->Add(BitCodeAbbrevOp(serialization::EXPR_CHARACTER_LITERAL));
2369  //Stmt
2370  // Expr
2371  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2372  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2373  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetValueKind
2374  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetObjectKind
2375  //Character Literal
2376  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // getValue
2377  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Location
2378  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); // getKind
2379  CharacterLiteralAbbrev = Stream.EmitAbbrev(std::move(Abv));
2380 
2381  // Abbreviation for EXPR_IMPLICIT_CAST
2382  Abv = std::make_shared<BitCodeAbbrev>();
2383  Abv->Add(BitCodeAbbrevOp(serialization::EXPR_IMPLICIT_CAST));
2384  // Stmt
2385  // Expr
2386  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Type
2387  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2388  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetValueKind
2389  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); //GetObjectKind
2390  // CastExpr
2391  Abv->Add(BitCodeAbbrevOp(0)); // PathSize
2392  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // HasFPFeatures
2393  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 6)); // CastKind
2394  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // PartOfExplicitCast
2395  // ImplicitCastExpr
2396  ExprImplicitCastAbbrev = Stream.EmitAbbrev(std::move(Abv));
2397 
2398  Abv = std::make_shared<BitCodeAbbrev>();
2399  Abv->Add(BitCodeAbbrevOp(serialization::DECL_CONTEXT_LEXICAL));
2400  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
2401  DeclContextLexicalAbbrev = Stream.EmitAbbrev(std::move(Abv));
2402 
2403  Abv = std::make_shared<BitCodeAbbrev>();
2404  Abv->Add(BitCodeAbbrevOp(serialization::DECL_CONTEXT_VISIBLE));
2405  Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
2406  DeclContextVisibleLookupAbbrev = Stream.EmitAbbrev(std::move(Abv));
2407 }
2408 
2409 /// isRequiredDecl - Check if this is a "required" Decl, which must be seen by
2410 /// consumers of the AST.
2411 ///
2412 /// Such decls will always be deserialized from the AST file, so we would like
2413 /// this to be as restrictive as possible. Currently the predicate is driven by
2414 /// code generation requirements, if other clients have a different notion of
2415 /// what is "required" then we may have to consider an alternate scheme where
2416 /// clients can iterate over the top-level decls and get information on them,
2417 /// without necessary deserializing them. We could explicitly require such
2418 /// clients to use a separate API call to "realize" the decl. This should be
2419 /// relatively painless since they would presumably only do it for top-level
2420 /// decls.
2421 static bool isRequiredDecl(const Decl *D, ASTContext &Context,
2422  bool WritingModule) {
2423  // An ObjCMethodDecl is never considered as "required" because its
2424  // implementation container always is.
2425 
2426  // File scoped assembly or obj-c or OMP declare target implementation must be
2427  // seen.
2428  if (isa<FileScopeAsmDecl, TopLevelStmtDecl, ObjCImplDecl>(D))
2429  return true;
2430 
2431  if (WritingModule && isPartOfPerModuleInitializer(D)) {
2432  // These declarations are part of the module initializer, and are emitted
2433  // if and when the module is imported, rather than being emitted eagerly.
2434  return false;
2435  }
2436 
2437  return Context.DeclMustBeEmitted(D);
2438 }
2439 
2440 void ASTWriter::WriteDecl(ASTContext &Context, Decl *D) {
2441  PrettyDeclStackTraceEntry CrashInfo(Context, D, SourceLocation(),
2442  "serializing");
2443 
2444  // Determine the ID for this declaration.
2446  assert(!D->isFromASTFile() && "should not be emitting imported decl");
2447  serialization::DeclID &IDR = DeclIDs[D];
2448  if (IDR == 0)
2449  IDR = NextDeclID++;
2450 
2451  ID = IDR;
2452 
2453  assert(ID >= FirstDeclID && "invalid decl ID");
2454 
2455  RecordData Record;
2456  ASTDeclWriter W(*this, Context, Record);
2457 
2458  // Build a record for this declaration
2459  W.Visit(D);
2460 
2461  // Emit this declaration to the bitstream.
2462  uint64_t Offset = W.Emit(D);
2463 
2464  // Record the offset for this declaration
2465  SourceLocation Loc = D->getLocation();
2466  unsigned Index = ID - FirstDeclID;
2467  if (DeclOffsets.size() == Index)
2468  DeclOffsets.emplace_back(getAdjustedLocation(Loc), Offset,
2469  DeclTypesBlockStartOffset);
2470  else if (DeclOffsets.size() < Index) {
2471  // FIXME: Can/should this happen?
2472  DeclOffsets.resize(Index+1);
2473  DeclOffsets[Index].setLocation(getAdjustedLocation(Loc));
2474  DeclOffsets[Index].setBitOffset(Offset, DeclTypesBlockStartOffset);
2475  } else {
2476  llvm_unreachable("declarations should be emitted in ID order");
2477  }
2478 
2479  SourceManager &SM = Context.getSourceManager();
2480  if (Loc.isValid() && SM.isLocalSourceLocation(Loc))
2481  associateDeclWithFile(D, ID);
2482 
2483  // Note declarations that should be deserialized eagerly so that we can add
2484  // them to a record in the AST file later.
2485  if (isRequiredDecl(D, Context, WritingModule))
2486  EagerlyDeserializedDecls.push_back(ID);
2487 }
2488 
2490  // Switch case IDs are per function body.
2491  Writer->ClearSwitchCaseIDs();
2492 
2493  assert(FD->doesThisDeclarationHaveABody());
2494  bool ModulesCodegen = false;
2495  if (!FD->isDependentContext()) {
2497  if (Writer->WritingModule &&
2498  Writer->WritingModule->isInterfaceOrPartition()) {
2499  // When building a C++20 module interface unit or a partition unit, a
2500  // strong definition in the module interface is provided by the
2501  // compilation of that unit, not by its users. (Inline functions are still
2502  // emitted in module users.)
2503  Linkage = Writer->Context->GetGVALinkageForFunction(FD);
2504  ModulesCodegen = *Linkage == GVA_StrongExternal;
2505  }
2506  if (Writer->Context->getLangOpts().ModulesCodegen ||
2507  (FD->hasAttr<DLLExportAttr>() &&
2508  Writer->Context->getLangOpts().BuildingPCHWithObjectFile)) {
2509 
2510  // Under -fmodules-codegen, codegen is performed for all non-internal,
2511  // non-always_inline functions, unless they are available elsewhere.
2512  if (!FD->hasAttr<AlwaysInlineAttr>()) {
2513  if (!Linkage)
2514  Linkage = Writer->Context->GetGVALinkageForFunction(FD);
2515  ModulesCodegen =
2517  }
2518  }
2519  }
2520  Record->push_back(ModulesCodegen);
2521  if (ModulesCodegen)
2522  Writer->ModularCodegenDecls.push_back(Writer->GetDeclRef(FD));
2523  if (auto *CD = dyn_cast<CXXConstructorDecl>(FD)) {
2524  Record->push_back(CD->getNumCtorInitializers());
2525  if (CD->getNumCtorInitializers())
2526  AddCXXCtorInitializers(
2527  llvm::makeArrayRef(CD->init_begin(), CD->init_end()));
2528  }
2529  AddStmt(FD->getBody());
2530 }
clang::serialization::DECL_CXX_METHOD
@ DECL_CXX_METHOD
A CXXMethodDecl record.
Definition: ASTBitCodes.h:1395
clang::DeclaratorDecl::getInnerLocStart
SourceLocation getInnerLocStart() const
Return start of source range ignoring outer template declarations.
Definition: Decl.h:801
clang::ExplicitSpecifier
Store information needed for an explicit specifier.
Definition: DeclCXX.h:1830
clang::serialization::EXPR_CHARACTER_LITERAL
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
Definition: ASTBitCodes.h:1629
clang::serialization::DECL_NAMESPACE
@ DECL_NAMESPACE
A NamespaceDecl record.
Definition: ASTBitCodes.h:1353
clang::VarTemplatePartialSpecializationDecl::getTemplateParameters
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Definition: DeclTemplate.h:3001
clang::TemplateDecl::getTemplatedDecl
NamedDecl * getTemplatedDecl() const
Get the underlying, templated declaration.
Definition: DeclTemplate.h:440
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1148
clang::RecordDecl::hasFlexibleArrayMember
bool hasFlexibleArrayMember() const
Definition: Decl.h:4037
clang::CXXConstructorDecl::getExplicitSpecifier
ExplicitSpecifier getExplicitSpecifier()
Definition: DeclCXX.h:2510
clang::HLSLBufferDecl::getLocStart
SourceLocation getLocStart() const LLVM_READONLY
Definition: Decl.h:4781
clang::OMPAllocateDecl
This represents '#pragma omp allocate ...' directive.
Definition: DeclOpenMP.h:473
clang::EmptyDecl
Represents an empty-declaration.
Definition: Decl.h:4742
clang::UsingDirectiveDecl::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
Definition: DeclCXX.h:2962
clang::ASTDeclWriter::VisitObjCCategoryDecl
void VisitObjCCategoryDecl(ObjCCategoryDecl *D)
Definition: ASTWriterDecl.cpp:845
clang::ConceptDecl::getConstraintExpr
Expr * getConstraintExpr() const
Definition: DeclTemplate.h:3274
clang::serialization::DECL_OMP_DECLARE_MAPPER
@ DECL_OMP_DECLARE_MAPPER
An OMPDeclareMapperDecl record.
Definition: ASTBitCodes.h:1512
clang::OMPDeclareReductionDecl::getInitializer
Expr * getInitializer()
Get initializer expression (if specified) of the declare reduction construct.
Definition: DeclOpenMP.h:239
clang::ASTDeclWriter::VisitFileScopeAsmDecl
void VisitFileScopeAsmDecl(FileScopeAsmDecl *D)
Definition: ASTWriterDecl.cpp:1168
clang::ObjCPropertyImplDecl::getPropertyIvarDecl
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:2843
clang::FunctionDecl::doesThisDeclarationHaveABody
bool doesThisDeclarationHaveABody() const
Returns whether this specific declaration of the function has a body.
Definition: Decl.h:2217
clang::ObjCCompatibleAliasDecl
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2740
clang::ASTDeclWriter::VisitDeclContext
void VisitDeclContext(DeclContext *DC)
Emit the DeclContext part of a declaration context decl.
Definition: ASTWriterDecl.cpp:1808
clang::ASTRecordWriter::AddFunctionDefinition
void AddFunctionDefinition(const FunctionDecl *FD)
Add a definition for the given function to the queue of statements to emit.
Definition: ASTWriterDecl.cpp:2489
clang::FunctionDecl::getDefaultedFunctionInfo
DefaultedFunctionInfo * getDefaultedFunctionInfo() const
Definition: Decl.cpp:3032
clang::serialization::DECL_CAPTURED
@ DECL_CAPTURED
A CapturedDecl record.
Definition: ASTBitCodes.h:1328
clang::AccessSpecDecl
Represents an access specifier followed by colon ':'.
Definition: DeclCXX.h:86
clang::FunctionDecl::isDefaulted
bool isDefaulted() const
Whether this function is defaulted.
Definition: Decl.h:2269
clang::BlockDecl::parameters
ArrayRef< ParmVarDecl * > parameters() const
Definition: Decl.h:4397
clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl
void VisitClassTemplatePartialSpecializationDecl(ClassTemplatePartialSpecializationDecl *D)
Definition: ASTWriterDecl.cpp:1603
clang::serialization::DECL_USING
@ DECL_USING
A UsingDecl record.
Definition: ASTBitCodes.h:1359
clang::serialization::DECL_PARM_VAR
@ DECL_PARM_VAR
A ParmVarDecl record.
Definition: ASTBitCodes.h:1310
clang::serialization::DECL_USING_SHADOW
@ DECL_USING_SHADOW
A UsingShadowDecl record.
Definition: ASTBitCodes.h:1368
clang::ObjCMethodDecl::hasRedeclaration
bool hasRedeclaration() const
True if redeclared in the same interface.
Definition: DeclObjC.h:274
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::FunctionDecl::hasWrittenPrototype
bool hasWrittenPrototype() const
Whether this function has a written prototype.
Definition: Decl.h:2332
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2436
clang::VarDecl::getStorageDuration
StorageDuration getStorageDuration() const
Get the storage duration of this variable, per C++ [basic.stc].
Definition: Decl.h:1176
clang::RecordDecl::hasVolatileMember
bool hasVolatileMember() const
Definition: Decl.h:4067
clang::ExportDecl::getRBraceLoc
SourceLocation getRBraceLoc() const
Definition: Decl.h:4714
clang::Decl::getBeginLoc
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: DeclBase.h:424
clang::FriendTemplateDecl::getFriendLoc
SourceLocation getFriendLoc() const
Retrieves the location of the 'friend' keyword.
Definition: DeclTemplate.h:2519
clang::ASTDeclWriter::VisitPragmaCommentDecl
void VisitPragmaCommentDecl(PragmaCommentDecl *D)
Definition: ASTWriterDecl.cpp:340
clang::BlockDecl::isVariadic
bool isVariadic() const
Definition: Decl.h:4386
clang::ObjCProtocolDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2125
clang::FriendTemplateDecl
Declaration of a friend template.
Definition: DeclTemplate.h:2467
clang::ObjCProtocolDecl::getODRHash
unsigned getODRHash()
Get precomputed ODRHash or add a new one.
Definition: DeclObjC.cpp:2053
clang::ASTDeclWriter::VisitUsingEnumDecl
void VisitUsingEnumDecl(UsingEnumDecl *D)
Definition: ASTWriterDecl.cpp:1306
clang::MSGuidDeclParts
Parts of a decomposed MSGuidDecl.
Definition: DeclCXX.h:4165
clang::TypeSourceInfo::getType
QualType getType() const
Return the type wrapped by this type source info.
Definition: Type.h:6604
clang::TemplateTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1742
clang::RecordDecl::hasNonTrivialToPrimitiveCopyCUnion
bool hasNonTrivialToPrimitiveCopyCUnion() const
Definition: Decl.h:4122
clang::NamespaceDecl::getRBraceLoc
SourceLocation getRBraceLoc() const
Definition: Decl.h:683
clang::DependentFunctionTemplateSpecializationInfo
Provides information about a dependent function-template specialization declaration.
Definition: DeclTemplate.h:694
clang::serialization::DECL_UNRESOLVED_USING_IF_EXISTS
@ DECL_UNRESOLVED_USING_IF_EXISTS
An UnresolvedUsingIfExistsDecl record.
Definition: ASTBitCodes.h:1452
clang::NamespaceDecl::getBeginLoc
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: Decl.h:682
clang::TemplateTypeParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1289
clang::serialization::EXPR_INTEGER_LITERAL
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
Definition: ASTBitCodes.h:1617
clang::VarDecl::isInlineSpecified
bool isInlineSpecified() const
Definition: Decl.h:1494
clang::MemberSpecializationInfo
Provides information a specialization of a member of a class template, which may be a member function...
Definition: DeclTemplate.h:630
clang::DeclarationName::Identifier
@ Identifier
Definition: DeclarationName.h:209
clang::ASTDeclWriter::VisitTypeAliasTemplateDecl
void VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D)
Definition: ASTWriterDecl.cpp:1793
clang::serialization::DECL_EMPTY
@ DECL_EMPTY
An EmptyDecl record.
Definition: ASTBitCodes.h:1491
clang::Decl::getEndLoc
SourceLocation getEndLoc() const LLVM_READONLY
Definition: DeclBase.h:428
clang::serialization::DECL_FRIEND_TEMPLATE
@ DECL_FRIEND_TEMPLATE
A FriendTemplateDecl record.
Definition: ASTBitCodes.h:1413
clang::ObjCImplementationDecl::init_end
init_iterator init_end()
init_end() - Retrieve an iterator past the last initializer.
Definition: DeclObjC.h:2643
clang::FunctionDecl::TK_MemberSpecialization
@ TK_MemberSpecialization
Definition: Decl.h:1918
clang::RecordDecl::getArgPassingRestrictions
ArgPassingKind getArgPassingRestrictions() const
Definition: Decl.h:4137
clang::LinkageSpecDecl
Represents a linkage specification.
Definition: DeclCXX.h:2832
clang::DecompositionDecl::bindings
ArrayRef< BindingDecl * > bindings() const
Definition: DeclCXX.h:4099
clang::serialization::DECL_TYPE_ALIAS_TEMPLATE
@ DECL_TYPE_ALIAS_TEMPLATE
A TypeAliasTemplateDecl record.
Definition: ASTBitCodes.h:1446
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1389
clang::serialization::DECL_DECOMPOSITION
@ DECL_DECOMPOSITION
A DecompositionDecl record.
Definition: ASTBitCodes.h:1313
clang::FunctionDecl::TK_FunctionTemplate
@ TK_FunctionTemplate
Definition: Decl.h:1915
clang::CXXConversionDecl
Represents a C++ conversion function within a class.
Definition: DeclCXX.h:2766
clang::Decl::hasAttr
bool hasAttr() const
Definition: DeclBase.h:560
clang::Redeclarable
Provides common interface for the Decls that can be redeclared.
Definition: Redeclarable.h:84
clang::ObjCPropertyImplDecl::getSetterCXXAssignment
Expr * getSetterCXXAssignment() const
Definition: DeclObjC.h:2879
clang::ObjCPropertyDecl::getGetterMethodDecl
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:896
clang::CXXRecordDecl::getMemberSpecializationInfo
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this class is an instantiation of a member class of a class template specialization,...
Definition: DeclCXX.cpp:1829
clang::NamespaceAliasDecl
Represents a C++ namespace alias.
Definition: DeclCXX.h:3021
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2565
clang::ASTDeclWriter::VisitTagDecl
void VisitTagDecl(TagDecl *D)
Definition: ASTWriterDecl.cpp:412
clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Definition: DeclTemplate.h:2155
clang::serialization::DECL_USING_PACK
@ DECL_USING_PACK
A UsingPackDecl record.
Definition: ASTBitCodes.h:1365
clang::FunctionTemplateSpecializationInfo::TemplateArguments
const TemplateArgumentList * TemplateArguments
The template arguments used to produce the function template specialization from the function templat...
Definition: DeclTemplate.h:495
clang::serialization::DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION
@ DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION
A ClassScopeFunctionSpecializationDecl record a class scope function specialization.
Definition: ASTBitCodes.h:1476
clang::MSPropertyDecl::getGetterId
IdentifierInfo * getGetterId() const
Definition: DeclCXX.h:4158
clang::Decl::isOutOfLine
virtual bool isOutOfLine() const
Determine whether this declaration is declared out of line (outside its semantic context).
Definition: Decl.cpp:101
clang::ASTDeclWriter::VisitUnresolvedUsingTypenameDecl
void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D)
Definition: ASTWriterDecl.cpp:1363
clang::ASTDeclWriter::VisitMSPropertyDecl
void VisitMSPropertyDecl(MSPropertyDecl *D)
Definition: ASTWriterDecl.cpp:963
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2917
clang::TopLevelStmtDecl::getStmt
Stmt * getStmt()
Definition: Decl.h:4301
clang::ObjCImplementationDecl::init_begin
init_iterator init_begin()
init_begin() - Retrieve an iterator to the first initializer.
Definition: DeclObjC.h:2634
clang::BindingDecl
A binding in a decomposition declaration.
Definition: DeclCXX.h:4008
clang::serialization::DECL_OMP_THREADPRIVATE
@ DECL_OMP_THREADPRIVATE
An OMPThreadPrivateDecl record.
Definition: ASTBitCodes.h:1482
llvm::SmallVector
Definition: LLVM.h:38
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::OMPThreadPrivateDecl
This represents '#pragma omp threadprivate ...' directive.
Definition: DeclOpenMP.h:110
clang::serialization::DECL_PRAGMA_COMMENT
@ DECL_PRAGMA_COMMENT
A PragmaCommentDecl record.
Definition: ASTBitCodes.h:1506
clang::ASTDeclWriter::VisitCXXDeductionGuideDecl
void VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D)
Definition: ASTWriterDecl.cpp:685
clang::VarTemplateSpecializationDecl::getTemplateInstantiationArgs
const TemplateArgumentList & getTemplateInstantiationArgs() const
Retrieve the set of template arguments that should be used to instantiate the initializer of the vari...
Definition: DeclTemplate.h:2862
clang::VarDecl::isInitCapture
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
Definition: Decl.h:1518
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::DeclContext::getPrimaryContext
DeclContext * getPrimaryContext()
getPrimaryContext - There may be many different declarations of the same entity (including forward de...
Definition: DeclBase.cpp:1264
clang::ASTDeclWriter::VisitCapturedDecl
void VisitCapturedDecl(CapturedDecl *D)
Definition: ASTWriterDecl.cpp:1226
clang::OMPDeclareReductionDecl::getInitPriv
Expr * getInitPriv()
Get Priv variable of the initializer.
Definition: DeclOpenMP.h:249
clang::ClassTemplateSpecializationDecl::getPointOfInstantiation
SourceLocation getPointOfInstantiation() const
Get the point of instantiation (if any), or null if none.
Definition: DeclTemplate.h:1963
clang::EnumDecl::getIntegerTypeSourceInfo
TypeSourceInfo * getIntegerTypeSourceInfo() const
Return the type source info for the underlying integer type, if no type source info exists,...
Definition: Decl.h:3881
clang::ClassTemplateSpecializationDecl::getSpecializedTemplate
ClassTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
Definition: DeclTemplate.cpp:986
clang::ASTRecordWriter::push_back
void push_back(uint64_t N)
Minimal vector-like interface.
Definition: ASTRecordWriter.h:79
clang::ClassTemplateSpecializationDecl::getExternLoc
SourceLocation getExternLoc() const
Gets the location of the extern keyword, if present.
Definition: DeclTemplate.h:2053
clang::ASTWriter::getFirstLocalDecl
const Decl * getFirstLocalDecl(const Decl *D)
Find the first local declaration of a given local redeclarable decl.
Definition: ASTWriterDecl.cpp:1813
clang::ConceptReference::getNamedConcept
ConceptDecl * getNamedConcept() const
Definition: ASTConcept.h:154
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:737
clang::TypeDecl::getTypeForDecl
const Type * getTypeForDecl() const
Definition: Decl.h:3257
clang::EnumDecl::isFixed
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
Definition: Decl.h:3919
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1407
Attr.h
clang::FileScopeAsmDecl::getRParenLoc
SourceLocation getRParenLoc() const
Definition: Decl.h:4266
clang::TypedefNameDecl::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo() const
Definition: Decl.h:3325
clang::TypeConstraint::getImmediatelyDeclaredConstraint
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
Definition: ASTConcept.h:187
clang::ASTDeclWriter::VisitNamespaceDecl
void VisitNamespaceDecl(NamespaceDecl *D)
Definition: ASTWriterDecl.cpp:1258
clang::ClassScopeFunctionSpecializationDecl::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Definition: DeclTemplate.h:2647
clang::CapturedDecl::getNumParams
unsigned getNumParams() const
Definition: Decl.h:4545
clang::ObjCIvarDecl::getAccessControl
AccessControl getAccessControl() const
Definition: DeclObjC.h:1969
clang::HLSLBufferDecl::getRBraceLoc
SourceLocation getRBraceLoc() const
Definition: Decl.h:4783
clang::serialization::DECL_USING_ENUM
@ DECL_USING_ENUM
A UsingEnumDecl record.
Definition: ASTBitCodes.h:1362
clang::ClassScopeFunctionSpecializationDecl
Declaration of a function specialization at template class scope.
Definition: DeclTemplate.h:2627
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2930
clang::ASTDeclWriter::VisitVarDecl
void VisitVarDecl(VarDecl *D)
Definition: ASTWriterDecl.cpp:1002
clang::ClassTemplateSpecializationDecl::getSpecializationKind
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
Definition: DeclTemplate.h:1924
clang::UnresolvedUsingTypenameDecl::getEllipsisLoc
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
Definition: DeclCXX.h:3911
clang::FieldDecl::getInClassInitializer
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
Definition: Decl.h:3077
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1712
clang::Redeclarable::getFirstDecl
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
Definition: Redeclarable.h:216
DeclCXX.h
clang::ObjCPropertyImplDecl::getGetterMethodDecl
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:2865
clang::ObjCCategoryDecl::getClassInterface
ObjCInterfaceDecl * getClassInterface()
Definition: DeclObjC.h:2338
clang::Decl::isUsed
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
Definition: DeclBase.cpp:457
clang::EnumDecl::getODRHash
unsigned getODRHash()
Definition: Decl.cpp:4638
clang::serialization::DECL_CONSTRUCTOR_USING_SHADOW
@ DECL_CONSTRUCTOR_USING_SHADOW
A ConstructorUsingShadowDecl record.
Definition: ASTBitCodes.h:1371
clang::DependentFunctionTemplateSpecializationInfo::getTemplateArg
const TemplateArgumentLoc & getTemplateArg(unsigned I) const
Returns the nth template argument.
Definition: DeclTemplate.h:748
clang::ASTDeclWriter::AddObjCTypeParamList
void AddObjCTypeParamList(ObjCTypeParamList *typeParams)
Add an Objective-C type parameter list to the given record.
Definition: ASTWriterDecl.cpp:164
clang::FunctionDecl::TK_FunctionTemplateSpecialization
@ TK_FunctionTemplateSpecialization
Definition: Decl.h:1922
clang::DependentFunctionTemplateSpecializationInfo::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Returns the number of explicit template arguments that were given.
Definition: DeclTemplate.h:741
clang::ASTContext::getInstantiatedFromUsingEnumDecl
UsingEnumDecl * getInstantiatedFromUsingEnumDecl(UsingEnumDecl *Inst)
If the given using-enum decl Inst is an instantiation of another using-enum decl, return it.
Definition: ASTContext.cpp:1589
clang::EnumConstantDecl::getInitExpr
const Expr * getInitExpr() const
Definition: Decl.h:3164
clang::TemplateSubstitutionKind::Specialization
@ Specialization
We are substituting template parameters for template arguments in order to form a template specializa...
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3222
clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl
void VisitVarTemplatePartialSpecializationDecl(VarTemplatePartialSpecializationDecl *D)
Definition: ASTWriterDecl.cpp:1664
clang::ASTDeclWriter::VisitFunctionTemplateDecl
void VisitFunctionTemplateDecl(FunctionTemplateDecl *D)
Definition: ASTWriterDecl.cpp:1691
clang::ASTDeclWriter::VisitOMPDeclareReductionDecl
void VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D)
Definition: ASTWriterDecl.cpp:1918
clang::NonTypeTemplateParmDecl::getExpansionType
QualType getExpansionType(unsigned I) const
Retrieve a particular expansion type within an expanded parameter pack.
Definition: DeclTemplate.h:1567
clang::ImplicitConceptSpecializationDecl::getTemplateArguments
ArrayRef< TemplateArgument > getTemplateArguments() const
Definition: DeclTemplate.h:3324
clang::Decl::getIdentifierNamespace
unsigned getIdentifierNamespace() const
Definition: DeclBase.h:854
clang::ASTDeclWriter::VisitNamedDecl
void VisitNamedDecl(NamedDecl *D)
Definition: ASTWriterDecl.cpp:366
clang::BlockDecl::getBody
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
Definition: Decl.h:4390
clang::FunctionDecl::TK_DependentNonTemplate
@ TK_DependentNonTemplate
Definition: Decl.h:1927
clang::FunctionDecl::getTemplateSpecializationInfo
FunctionTemplateSpecializationInfo * getTemplateSpecializationInfo() const
If this function is actually a function template specialization, retrieve information about this func...
Definition: Decl.cpp:3926
clang::FunctionDecl::hasImplicitReturnZero
bool hasImplicitReturnZero() const
Whether falling off this function implicitly returns null/zero.
Definition: Decl.h:2312
clang::ObjCPropertyImplDecl
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2770
clang::ASTDeclWriter::VisitVarTemplateSpecializationDecl
void VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D)
Definition: ASTWriterDecl.cpp:1627
clang::ParmVarDecl::getObjCDeclQualifier
ObjCDeclQualifier getObjCDeclQualifier() const
Definition: Decl.h:1776
clang::MSGuidDecl::getParts
Parts getParts() const
Get the decomposed parts of this declaration.
Definition: DeclCXX.h:4220
clang::serialization::DECL_IMPLICIT_PARAM
@ DECL_IMPLICIT_PARAM
An ImplicitParamDecl record.
Definition: ASTBitCodes.h:1307
llvm::Optional
Definition: LLVM.h:40
clang::ComparisonCategoryType::First
@ First
clang::ASTContext::getObjCMethodRedeclaration
const ObjCMethodDecl * getObjCMethodRedeclaration(const ObjCMethodDecl *MD) const
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
Definition: ASTContext.cpp:2974
clang::TagDecl::isEmbeddedInDeclarator
bool isEmbeddedInDeclarator() const
True if this tag declaration is "embedded" (i.e., defined or declared for the very first time) in the...
Definition: Decl.h:3552
clang::serialization::DECL_UNRESOLVED_USING_TYPENAME
@ DECL_UNRESOLVED_USING_TYPENAME
An UnresolvedUsingTypenameDecl record.
Definition: ASTBitCodes.h:1380
SourceManager.h
clang::NonTypeTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1486
clang::UnresolvedUsingTypenameDecl::getTypenameLoc
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
Definition: DeclCXX.h:3890
clang::VarTemplateSpecializationDecl::getTemplateArgs
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the variable template specialization.
Definition: DeclTemplate.h:2778
clang::ASTDeclWriter::VisitDecl
void VisitDecl(Decl *D)
Definition: ASTWriterDecl.cpp:301
clang::HLSLBufferDecl::isCBuffer
bool isCBuffer() const
Definition: Decl.h:4785
clang::TagDecl::getTypedefNameForAnonDecl
TypedefNameDecl * getTypedefNameForAnonDecl() const
Definition: Decl.h:3651
clang::serialization::DECL_CLASS_TEMPLATE
@ DECL_CLASS_TEMPLATE
A ClassTemplateDecl record.
Definition: ASTBitCodes.h:1416
clang::ASTDeclWriter::VisitTypeAliasDecl
void VisitTypeAliasDecl(TypeAliasDecl *D)
Definition: ASTWriterDecl.cpp:406
clang::serialization::DECL_OBJC_PROPERTY_IMPL
@ DECL_OBJC_PROPERTY_IMPL
A ObjCPropertyImplDecl record.
Definition: ASTBitCodes.h:1289
clang::ObjCPropertyImplDecl::getPropertyIvarDeclLoc
SourceLocation getPropertyIvarDeclLoc() const
Definition: DeclObjC.h:2846
clang::IndirectFieldDecl::getChainingSize
unsigned getChainingSize() const
Definition: Decl.h:3212
clang::ClassTemplatePartialSpecializationDecl
Definition: DeclTemplate.h:2098
clang::UsingPackDecl
Represents a pack of using declarations that a single using-declarator pack-expanded into.
Definition: DeclCXX.h:3693
clang::CXXDestructorDecl::getOperatorDelete
const FunctionDecl * getOperatorDelete() const
Definition: DeclCXX.h:2736
clang::ExportDecl
Represents a C++ Modules TS module export declaration.
Definition: Decl.h:4695
clang::ObjCPropertyDecl::getPropertyImplementation
PropertyControl getPropertyImplementation() const
Definition: DeclObjC.h:907
clang::ASTDeclWriter::VisitEnumDecl
void VisitEnumDecl(EnumDecl *D)
Definition: ASTWriterDecl.cpp:436
clang::RedeclarableTemplateDecl
Declaration of a redeclarable template.
Definition: DeclTemplate.h:763
clang::MSGuidDeclParts::Part1
uint32_t Part1
{01234567-...
Definition: DeclCXX.h:4167
clang::serialization::DECL_REQUIRES_EXPR_BODY
@ DECL_REQUIRES_EXPR_BODY
A RequiresExprBodyDecl record.
Definition: ASTBitCodes.h:1497
clang::FunctionDecl::isInlineSpecified
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition: Decl.h:2679
clang::ASTContext::getCurrentKeyFunction
const CXXMethodDecl * getCurrentKeyFunction(const CXXRecordDecl *RD)
Get our current best idea for the key function of the given record decl, or nullptr if there isn't on...
Definition: RecordLayoutBuilder.cpp:3367
clang::ASTTemplateArgumentListInfo::NumTemplateArgs
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
Definition: TemplateBase.h:634
clang::LifetimeExtendedTemporaryDecl::getManglingNumber
unsigned getManglingNumber() const
Definition: DeclCXX.h:3180
clang::VarTemplateSpecializationDecl
Represents a variable template specialization, which refers to a variable template with a given set o...
Definition: DeclTemplate.h:2687
clang::Decl::isTopLevelDeclInObjCContainer
bool isTopLevelDeclInObjCContainer() const
Whether this declaration is a top-level declaration (function, global variable, etc....
Definition: DeclBase.h:611
clang::CapturedDecl
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4500
clang::serialization::DECL_FIELD
@ DECL_FIELD
A FieldDecl record.
Definition: ASTBitCodes.h:1292
clang::serialization::DECL_TYPEALIAS
@ DECL_TYPEALIAS
A TypeAliasDecl record.
Definition: ASTBitCodes.h:1244
clang::FunctionDecl::getMemberSpecializationInfo
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this function is an instantiation of a member function of a class template specialization,...
Definition: Decl.cpp:3781
clang::ASTDeclWriter::VisitClassScopeFunctionSpecializationDecl
void VisitClassScopeFunctionSpecializationDecl(ClassScopeFunctionSpecializationDecl *D)
Definition: ASTWriterDecl.cpp:1680
clang::ASTDeclWriter::VisitObjCImplementationDecl
void VisitObjCImplementationDecl(ObjCImplementationDecl *D)
Definition: ASTWriterDecl.cpp:899
clang::AccessSpecDecl::getColonLoc
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
Definition: DeclCXX.h:108
clang::ObjCMethodDecl::isOverriding
bool isOverriding() const
Whether this method overrides any other in the class hierarchy.
Definition: DeclObjC.h:466
clang::FunctionDecl::param_size
size_t param_size() const
Definition: Decl.h:2587
clang::serialization::isPartOfPerModuleInitializer
bool isPartOfPerModuleInitializer(const Decl *D)
Determine whether the given declaration will be included in the per-module initializer if it needs to...
Definition: ASTCommon.h:116
clang::serialization::DECL_UNNAMED_GLOBAL_CONSTANT
@ DECL_UNNAMED_GLOBAL_CONSTANT
A UnnamedGlobalConstantDecl record.
Definition: ASTBitCodes.h:1518
clang::ASTContext::getSourceManager
SourceManager & getSourceManager()
Definition: ASTContext.h:694
clang::RecordDecl::isNonTrivialToPrimitiveDestroy
bool isNonTrivialToPrimitiveDestroy() const
Definition: Decl.h:4098
clang::TemplateTypeParmDecl::hasTypeConstraint
bool hasTypeConstraint() const
Determine whether this template parameter has a type-constraint.
Definition: DeclTemplate.h:1381
clang::serialization::DECL_HLSL_BUFFER
@ DECL_HLSL_BUFFER
A HLSLBufferDecl record.
Definition: ASTBitCodes.h:1521
clang::Decl::isReferenced
bool isReferenced() const
Whether any declaration of this entity was referenced.
Definition: DeclBase.cpp:482
clang::serialization::DECL_RECORD
@ DECL_RECORD
A RecordDecl record.
Definition: ASTBitCodes.h:1250
clang::serialization::DECL_FUNCTION_TEMPLATE
@ DECL_FUNCTION_TEMPLATE
A FunctionTemplateDecl record.
Definition: ASTBitCodes.h:1434
clang::serialization::DECL_OBJC_INTERFACE
@ DECL_OBJC_INTERFACE
A ObjCInterfaceDecl record.
Definition: ASTBitCodes.h:1262
clang::ASTDeclWriter::VisitObjCImplDecl
void VisitObjCImplDecl(ObjCImplDecl *D)
Definition: ASTWriterDecl.cpp:887
clang::EnumDecl::getNumPositiveBits
unsigned getNumPositiveBits() const
Returns the width in bits required to store all the non-negative enumerators of this enum.
Definition: Decl.h:3891
clang::OMPDeclareReductionDecl::getCombinerOut
Expr * getCombinerOut()
Get Out variable of the combiner.
Definition: DeclOpenMP.h:227
clang::TemplateTypeParmDecl::getDefaultArgumentInfo
TypeSourceInfo * getDefaultArgumentInfo() const
Retrieves the default argument's source information, if any.
Definition: DeclTemplate.h:1280
clang::ObjCImplDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2453
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:637
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3705
clang::serialization::DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
@ DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
A ClassTemplatePartialSpecializationDecl record.
Definition: ASTBitCodes.h:1422
clang::Decl::getModuleOwnershipKind
ModuleOwnershipKind getModuleOwnershipKind() const
Get the kind of module ownership for this declaration.
Definition: DeclBase.h:841
clang::FieldDecl::hasCapturedVLAType
bool hasCapturedVLAType() const
Determine whether this member captures the variable length array type.
Definition: Decl.h:3103
clang::ASTDeclWriter::VisitFriendDecl
void VisitFriendDecl(FriendDecl *D)
Definition: ASTWriterDecl.cpp:1484
clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember
VarTemplatePartialSpecializationDecl * getInstantiatedFromMember() const
Retrieve the member variable template partial specialization from which this particular variable temp...
Definition: DeclTemplate.h:3044
clang::ASTDeclWriter::AddTemplateSpecializations
void AddTemplateSpecializations(DeclTy *D)
Definition: ASTWriterDecl.cpp:212
clang::ASTDeclWriter::VisitUsingPackDecl
void VisitUsingPackDecl(UsingPackDecl *D)
Definition: ASTWriterDecl.cpp:1316
clang::UsingShadowDecl::getTargetDecl
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3286
clang::ASTRecordWriter::AddSourceLocation
void AddSourceLocation(SourceLocation Loc, LocSeq *Seq=nullptr)
Emit a source location.
Definition: ASTRecordWriter.h:137
clang::FunctionDecl::isInlined
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
Definition: Decl.h:2701
clang::FunctionTemplateSpecializationInfo::getTemplate
FunctionTemplateDecl * getTemplate() const
Retrieve the template from which this function was specialized.
Definition: DeclTemplate.h:537
clang::TemplateTypeParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1272
clang::ASTDeclWriter::getSpecializationDecl
RedeclarableTemplateDecl::SpecEntryTraits< EntryType >::DeclType * getSpecializationDecl(EntryType &T)
Get the specialization decl from an entry in the specialization list.
Definition: ASTWriterDecl.cpp:198
clang::ASTDeclWriter::VisitFunctionDecl
void VisitFunctionDecl(FunctionDecl *D)
Definition: ASTWriterDecl.cpp:543
clang::FunctionDecl::isVirtualAsWritten
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition: Decl.h:2235
Offset
unsigned Offset
Definition: Format.cpp:2717
clang::ASTDeclWriter::VisitImportDecl
void VisitImportDecl(ImportDecl *D)
Definition: ASTWriterDecl.cpp:1460
clang::serialization::DECL_CXX_RECORD
@ DECL_CXX_RECORD
A CXXRecordDecl record.
Definition: ASTBitCodes.h:1389
clang::PragmaCommentDecl::getCommentKind
PragmaMSCommentKind getCommentKind() const
Definition: Decl.h:161
clang::AS_none
@ AS_none
Definition: Specifiers.h:115
clang::ObjCInterfaceDecl::isThisDeclarationADefinition
bool isThisDeclarationADefinition() const
Determine whether this particular declaration of this class is actually also a definition.
Definition: DeclObjC.h:1506
clang::BlockDecl::captures
ArrayRef< Capture > captures() const
Definition: Decl.h:4438
clang::OMPDeclareMapperDecl::getVarName
DeclarationName getVarName()
Get the name of the variable declared in the mapper.
Definition: DeclOpenMP.h:359
clang::BlockDecl::doesNotEscape
bool doesNotEscape() const
Definition: Decl.h:4462
clang::serialization::needsAnonymousDeclarationNumber
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
Definition: ASTCommon.cpp:452
clang::CXXRecordDecl::getDescribedClassTemplate
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
Definition: DeclCXX.cpp:1843
clang::FunctionDecl::getODRHash
unsigned getODRHash()
Returns ODRHash of the function.
Definition: Decl.cpp:4249
clang::UnresolvedUsingTypenameDecl
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3858
clang::ASTRecordWriter::AddStmt
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
Definition: ASTRecordWriter.h:122
clang::ASTDeclWriter::VisitTemplateTypeParmDecl
void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D)
Definition: ASTWriterDecl.cpp:1699
clang::CXXRecordDecl::classofKind
static bool classofKind(Kind K)
Definition: DeclCXX.h:1822
clang::Decl::getLexicalDeclContext
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition: DeclBase.h:883
clang::VarDecl::isInline
bool isInline() const
Whether this variable is (C++1z) inline.
Definition: Decl.h:1491
clang::FunctionTemplateDecl
Declaration of a template function.
Definition: DeclTemplate.h:1006
clang::ASTDeclWriter::VisitDeclaratorDecl
void VisitDeclaratorDecl(DeclaratorDecl *D)
Definition: ASTWriterDecl.cpp:529
clang::serialization::DECL_FILE_SCOPE_ASM
@ DECL_FILE_SCOPE_ASM
A FileScopeAsmDecl record.
Definition: ASTBitCodes.h:1319
clang::serialization::DECL_OBJC_COMPATIBLE_ALIAS
@ DECL_OBJC_COMPATIBLE_ALIAS
A ObjCCompatibleAliasDecl record.
Definition: ASTBitCodes.h:1283
clang::TemplateTypeParmDecl::isExpandedParameterPack
bool isExpandedParameterPack() const
Whether this parameter is a template type parameter pack that has a known list of different type-cons...
Definition: DeclTemplate.h:1359
clang::ObjCPropertyImplDecl::getSetterMethodDecl
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:2868
clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation
SourceLocation getPointOfInstantiation() const
Retrieve the first point of instantiation of this function template specialization.
Definition: DeclTemplate.h:568
clang::ObjCProtocolDecl::protocol_size
unsigned protocol_size() const
Definition: DeclObjC.h:2164
clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember
ClassTemplatePartialSpecializationDecl * getInstantiatedFromMember() const
Retrieve the member class template partial specialization from which this particular class template p...
Definition: DeclTemplate.h:2198
clang::ASTContext::getExternalSource
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition: ASTContext.h:1167
clang::VarTemplateSpecializationDecl::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Gets the location of the template keyword, if present.
Definition: DeclTemplate.h:2925
clang::TranslationUnitDecl
The top declaration context.
Definition: Decl.h:80
clang::NonTypeTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1496
clang::ConceptReference::getTemplateArgsAsWritten
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Definition: ASTConcept.h:158
clang::FunctionDecl::getConstexprKind
ConstexprSpecKind getConstexprKind() const
Definition: Decl.h:2360
clang::ObjCMethodDecl::hasRelatedResultType
bool hasRelatedResultType() const
Determine whether this method has a result type that is related to the message receiver's type.
Definition: DeclObjC.h:259
clang::serialization::DECL_TEMPLATE_TEMPLATE_PARM
@ DECL_TEMPLATE_TEMPLATE_PARM
A TemplateTemplateParmDecl record.
Definition: ASTBitCodes.h:1443
clang::OMPDeclareMapperDecl::getPrevDeclInScope
OMPDeclareMapperDecl * getPrevDeclInScope()
Get reference to previous declare mapper construct in the same scope with the same name.
Definition: DeclOpenMP.cpp:158
clang::VarTemplatePartialSpecializationDecl::isMemberSpecialization
bool isMemberSpecialization()
Determines whether this variable template partial specialization was a specialization of a member par...
Definition: DeclTemplate.h:3072
clang::CXXMethodDecl::overridden_methods
overridden_method_range overridden_methods() const
Definition: DeclCXX.cpp:2467
clang::ClassTemplateSpecializationDecl::getTemplateArgs
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the class template specialization.
Definition: DeclTemplate.h:1914
DeclTemplate.h
clang::NamespaceDecl::isNested
bool isNested() const
Returns true if this is a nested namespace declaration.
Definition: Decl.h:624
clang::FunctionDecl::hasSkippedBody
bool hasSkippedBody() const
True if the function was a definition but its body was skipped.
Definition: Decl.h:2496
clang::ASTDeclWriter::VisitRedeclarableTemplateDecl
void VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D)
Definition: ASTWriterDecl.cpp:1543
clang::OMPDeclareReductionDecl
This represents '#pragma omp declare reduction ...' directive.
Definition: DeclOpenMP.h:171
clang::RequiresExprBodyDecl
Represents the body of a requires-expression.
Definition: DeclCXX.h:1961
clang::Linkage
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
Definition: Linkage.h:23
clang::ImportDecl
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition: Decl.h:4615
clang::Decl::getAccess
AccessSpecifier getAccess() const
Definition: DeclBase.h:491
clang::ASTDeclWriter::VisitFieldDecl
void VisitFieldDecl(FieldDecl *D)
Definition: ASTWriterDecl.cpp:927
clang::FunctionDecl::isTrivial
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
Definition: Decl.h:2261
clang::UsingEnumDecl::getUsingLoc
SourceLocation getUsingLoc() const
The source location of the 'using' keyword.
Definition: DeclCXX.h:3634
clang::RecordDecl::hasNonTrivialToPrimitiveDestructCUnion
bool hasNonTrivialToPrimitiveDestructCUnion() const
Definition: Decl.h:4114
clang::ASTDeclWriter::Visit
void Visit(Decl *D)
Definition: ASTWriterDecl.cpp:274
clang::ObjCImplementationDecl::getSuperClassLoc
SourceLocation getSuperClassLoc() const
Definition: DeclObjC.h:2702
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4311
clang::ASTDeclWriter::VisitObjCIvarDecl
void VisitObjCIvarDecl(ObjCIvarDecl *D)
Definition: ASTWriterDecl.cpp:802
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:435
clang::ObjCMethodDecl::isDefined
bool isDefined() const
Definition: DeclObjC.h:456
clang::FunctionDecl::getTemplatedKind
TemplatedKind getTemplatedKind() const
What kind of templated function this is.
Definition: Decl.cpp:3753
clang::TypedefNameDecl::isModed
bool isModed() const
Definition: Decl.h:3321
clang::NonTypeTemplateParmDecl::getNumExpansionTypes
unsigned getNumExpansionTypes() const
Retrieves the number of expansion types in an expanded parameter pack.
Definition: DeclTemplate.h:1560
clang::ObjCInterfaceDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:1342
ASTCommon.h
hlsl::uint64_t
unsigned long uint64_t
Definition: hlsl_basic_types.h:25
clang::ConceptDecl
Declaration of a C++20 concept.
Definition: DeclTemplate.h:3259
clang::serialization::DECL_VAR_TEMPLATE_SPECIALIZATION
@ DECL_VAR_TEMPLATE_SPECIALIZATION
A VarTemplateSpecializationDecl record.
Definition: ASTBitCodes.h:1428
clang::OMPDeclareReductionDecl::getPrevDeclInScope
OMPDeclareReductionDecl * getPrevDeclInScope()
Get reference to previous declare reduction construct in the same scope with the same name.
Definition: DeclOpenMP.cpp:126
clang::serialization::DECL_CXX_DEDUCTION_GUIDE
@ DECL_CXX_DEDUCTION_GUIDE
A CXXDeductionGuideDecl record.
Definition: ASTBitCodes.h:1392
clang::ASTDeclWriter::VisitUnresolvedUsingValueDecl
void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D)
Definition: ASTWriterDecl.cpp:1354
clang::VarDecl::isObjCForDecl
bool isObjCForDecl() const
Determine whether this variable is a for-loop declaration for a for-in statement in Objective-C.
Definition: Decl.h:1472
PrettyDeclStackTrace.h
clang::TemplateTemplateParmDecl::getPosition
unsigned getPosition() const
Get the position of the template parameter within its parameter list.
Definition: DeclTemplate.h:1188
clang::CXXDeductionGuideDecl::isCopyDeductionCandidate
bool isCopyDeductionCandidate() const
Definition: DeclCXX.h:1939
clang::ObjCImplementationDecl::hasDestructors
bool hasDestructors() const
Do any of the ivars of this class (not counting its base classes) require non-trivial destruction?
Definition: DeclObjC.h:2672
clang::DeclAccessPair
A POD class for pairing a NamedDecl* with an access specifier.
Definition: DeclAccessPair.h:29
clang::VarDecl::getMemberSpecializationInfo
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this variable is an instantiation of a static data member of a class template specialization,...
Definition: Decl.cpp:2783
clang::ASTDeclWriter::VisitObjCCategoryImplDecl
void VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D)
Definition: ASTWriterDecl.cpp:893
clang::serialization::DECL_CXX_DESTRUCTOR
@ DECL_CXX_DESTRUCTOR
A CXXDestructorDecl record.
Definition: ASTBitCodes.h:1401
clang::FieldDecl::getBitWidth
Expr * getBitWidth() const
Definition: Decl.h:3019
clang::ASTDeclWriter::VisitMSGuidDecl
void VisitMSGuidDecl(MSGuidDecl *D)
Definition: ASTWriterDecl.cpp:970
clang::ClassScopeFunctionSpecializationDecl::getTemplateArgsAsWritten
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Definition: DeclTemplate.h:2648
clang::VarDecl::isStaticDataMember
bool isStaticDataMember() const
Determines whether this is a static data member.
Definition: Decl.h:1230
clang::ASTDeclWriter::VisitImplicitConceptSpecializationDecl
void VisitImplicitConceptSpecializationDecl(ImplicitConceptSpecializationDecl *D)
Definition: ASTWriterDecl.cpp:1530
clang::FunctionTemplateDecl::Common
Data that is common to all of the declarations of a given function template.
Definition: DeclTemplate.h:1012
clang::TemplateTemplateParmDecl::getExpansionTemplateParameters
TemplateParameterList * getExpansionTemplateParameters(unsigned I) const
Retrieve a particular expansion type within an expanded parameter pack.
Definition: DeclTemplate.h:1733
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:182
clang::FriendDecl::getFriendDecl
NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
Definition: DeclFriend.h:137
clang::VarTemplatePartialSpecializationDecl::getTemplateArgsAsWritten
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Get the template arguments as written.
Definition: DeclTemplate.h:3006
clang::ObjCPropertyDecl::getSetterMethodDecl
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:899
clang::ASTDeclWriter::VisitOMPThreadPrivateDecl
void VisitOMPThreadPrivateDecl(OMPThreadPrivateDecl *D)
Definition: ASTWriterDecl.cpp:1900
clang::NamespaceAliasDecl::getNamespaceLoc
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
Definition: DeclCXX.h:3110
clang::DecompositionDecl
A decomposition declaration.
Definition: DeclCXX.h:4065
clang::FunctionDecl::getBody
Stmt * getBody(const FunctionDecl *&Definition) const
Retrieve the body (definition) of the function.
Definition: Decl.cpp:3116
clang::FunctionTemplateDecl::getCanonicalDecl
FunctionTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
Definition: DeclTemplate.h:1067
clang::StaticAssertDecl::getRParenLoc
SourceLocation getRParenLoc() const
Definition: DeclCXX.h:3990
clang::ASTDeclWriter::getPartialSpecializations
decltype(T::PartialSpecializations) & getPartialSpecializations(T *Common)
Get the list of partial specializations from a template's common ptr.
Definition: ASTWriterDecl.cpp:204
clang::ASTDeclWriter::VisitTypeDecl
void VisitTypeDecl(TypeDecl *D)
Definition: ASTWriterDecl.cpp:374
clang::serialization::DECL_OBJC_CATEGORY
@ DECL_OBJC_CATEGORY
A ObjCCategoryDecl record.
Definition: ASTBitCodes.h:1274
clang::UnresolvedUsingTypenameDecl::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Definition: DeclCXX.h:3894
clang::Decl::isInvalidDecl
bool isInvalidDecl() const
Definition: DeclBase.h:571
clang::ASTDeclWriter::VisitRedeclarable
void VisitRedeclarable(Redeclarable< T > *D)
Definition: ASTWriterDecl.cpp:1831
clang::serialization::DECL_OBJC_AT_DEFS_FIELD
@ DECL_OBJC_AT_DEFS_FIELD
A ObjCAtDefsFieldDecl record.
Definition: ASTBitCodes.h:1271
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:61
clang::ObjCPropertyDecl::getSetterName
Selector getSetterName() const
Definition: DeclObjC.h:888
clang::serialization::EXPR_IMPLICIT_CAST
@ EXPR_IMPLICIT_CAST
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1668
clang::ASTDeclWriter::VisitValueDecl
void VisitValueDecl(ValueDecl *D)
Definition: ASTWriterDecl.cpp:514
clang::serialization::DECL_LINKAGE_SPEC
@ DECL_LINKAGE_SPEC
A LinkageSpecDecl record.
Definition: ASTBitCodes.h:1383
clang::ASTDeclWriter::VisitExportDecl
void VisitExportDecl(ExportDecl *D)
Definition: ASTWriterDecl.cpp:1245
clang::serialization::DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION
@ DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION
A VarTemplatePartialSpecializationDecl record.
Definition: ASTBitCodes.h:1431
clang::VarDecl::isEscapingByref
bool isEscapingByref() const
Indicates the capture is a __block variable that is captured by a block that can potentially escape (...
Definition: Decl.cpp:2591
clang::ObjCPropertyImplDecl::getGetterCXXConstructor
Expr * getGetterCXXConstructor() const
Definition: DeclObjC.h:2871
clang::serialization::DECL_CLASS_TEMPLATE_SPECIALIZATION
@ DECL_CLASS_TEMPLATE_SPECIALIZATION
A ClassTemplateSpecializationDecl record.
Definition: ASTBitCodes.h:1419
clang::TagDecl::isThisDeclarationADefinition
bool isThisDeclarationADefinition() const
Return true if this declaration is a completion definition of the type.
Definition: Decl.h:3523
clang::StaticAssertDecl::getMessage
StringLiteral * getMessage()
Definition: DeclCXX.h:3985
clang::VarDecl::isNRVOVariable
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
Definition: Decl.h:1452
clang::LabelDecl
Represents the declaration of a label.
Definition: Decl.h:496
clang::ObjCMethodDecl::getSelfDecl
ImplicitParamDecl * getSelfDecl() const
Definition: DeclObjC.h:422
clang::FriendTemplateDecl::getTemplateParameterList
TemplateParameterList * getTemplateParameterList(unsigned i) const
Definition: DeclTemplate.h:2523
clang::serialization::DECL_VAR_TEMPLATE
@ DECL_VAR_TEMPLATE
A VarTemplateDecl record.
Definition: ASTBitCodes.h:1425
clang::Decl::getCanonicalDecl
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
Definition: DeclBase.h:943
clang::UsingDecl::getUsingLoc
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
Definition: DeclCXX.h:3441
clang::EnumDecl::getMemberSpecializationInfo
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this enumeration is an instantiation of a member enumeration of a class template specialization,...
Definition: Decl.h:3964
clang::MSPropertyDecl::getSetterId
IdentifierInfo * getSetterId() const
Definition: DeclCXX.h:4160
clang::ASTDeclWriter::VisitCXXRecordDecl
void VisitCXXRecordDecl(CXXRecordDecl *D)
Definition: ASTWriterDecl.cpp:1378
clang::EnumConstantDecl::getInitVal
const llvm::APSInt & getInitVal() const
Definition: Decl.h:3166
clang::MSGuidDecl
A global _GUID constant.
Definition: DeclCXX.h:4188
clang::TypedefNameDecl::getUnderlyingType
QualType getUnderlyingType() const
Definition: Decl.h:3330
clang::ObjCIvarDecl::getSynthesize
bool getSynthesize() const
Definition: DeclObjC.h:1976
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2703
clang::ObjCInterfaceDecl::getCategoryListRaw
ObjCCategoryDecl * getCategoryListRaw() const
Retrieve the raw pointer to the start of the category/extension list.
Definition: DeclObjC.h:1760
isRequiredDecl
static bool isRequiredDecl(const Decl *D, ASTContext &Context, bool WritingModule)
isRequiredDecl - Check if this is a "required" Decl, which must be seen by consumers of the AST.
Definition: ASTWriterDecl.cpp:2421
clang::ASTDeclWriter::VisitRequiresExprBodyDecl
void VisitRequiresExprBodyDecl(RequiresExprBodyDecl *D)
Definition: ASTWriterDecl.cpp:1539
clang::EnumDecl::getMostRecentDecl
EnumDecl * getMostRecentDecl()
Definition: Decl.h:3801
clang::ImplicitParamDecl
Definition: Decl.h:1645
clang::ASTDeclWriter::VisitCXXConversionDecl
void VisitCXXConversionDecl(CXXConversionDecl *D)
Definition: ASTWriterDecl.cpp:1454
clang::HLSLBufferDecl::getLBraceLoc
SourceLocation getLBraceLoc() const
Definition: Decl.h:4782
clang::FieldDecl::hasInClassInitializer
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
Definition: Decl.h:3070
Expr.h
clang::FriendTemplateDecl::getFriendDecl
NamedDecl * getFriendDecl() const
If this friend declaration names a templated function (or a member function of a templated type),...
Definition: DeclTemplate.h:2514
clang::ASTDeclWriter::VisitLifetimeExtendedTemporaryDecl
void VisitLifetimeExtendedTemporaryDecl(LifetimeExtendedTemporaryDecl *D)
Definition: ASTWriterDecl.cpp:1186
clang::FriendDecl
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition: DeclFriend.h:53
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1624
clang::TypeDecl::getBeginLoc
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: Decl.h:3260
clang::TemplateTemplateParmDecl::getNumExpansionTemplateParameters
unsigned getNumExpansionTemplateParameters() const
Retrieves the number of expansion template parameters in an expanded parameter pack.
Definition: DeclTemplate.h:1726
clang::serialization::DECL_OBJC_PROPERTY
@ DECL_OBJC_PROPERTY
A ObjCPropertyDecl record.
Definition: ASTBitCodes.h:1286
clang::ObjCMethodDecl::hasSkippedBody
bool hasSkippedBody() const
True if the method was a definition but its body was skipped.
Definition: DeclObjC.h:481
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:906
clang::ObjCMethodDecl::getReturnType
QualType getReturnType() const
Definition: DeclObjC.h:332
clang::serialization::DECL_OMP_REQUIRES
@ DECL_OMP_REQUIRES
An OMPRequiresDecl record.
Definition: ASTBitCodes.h:1485
clang::ASTDeclWriter::VisitTranslationUnitDecl
void VisitTranslationUnitDecl(TranslationUnitDecl *D)
Definition: ASTWriterDecl.cpp:362
clang::serialization::DECL_CXX_CONVERSION
@ DECL_CXX_CONVERSION
A CXXConversionDecl record.
Definition: ASTBitCodes.h:1404
clang::EnumDecl::getPromotionType
QualType getPromotionType() const
Return the integer type that enumerators should promote to.
Definition: Decl.h:3857
clang::serialization::DECL_USING_DIRECTIVE
@ DECL_USING_DIRECTIVE
A UsingDirecitveDecl record.
Definition: ASTBitCodes.h:1374
clang::ASTRecordWriter::size
size_t size() const
Definition: ASTRecordWriter.h:85
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3423
clang::OMPDeclareMapperDecl
This represents '#pragma omp declare mapper ...' directive.
Definition: DeclOpenMP.h:286
clang::PragmaCommentDecl::getArg
StringRef getArg() const
Definition: Decl.h:163
clang::UsingDirectiveDecl::getNamespaceKeyLocation
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
Definition: DeclCXX.h:2992
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2512
clang::serialization::DECL_ENUM
@ DECL_ENUM
An EnumDecl record.
Definition: ASTBitCodes.h:1247
clang::TypeDecl
Represents a declaration of a type.
Definition: Decl.h:3233
clang::Type::getAsCXXRecordDecl
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Definition: Type.cpp:1760
clang::NamedDecl::isModulePrivate
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
Definition: DeclBase.h:625
clang::serialization::DECL_STATIC_ASSERT
@ DECL_STATIC_ASSERT
A StaticAssertDecl record.
Definition: ASTBitCodes.h:1455
clang::DependentFunctionTemplateSpecializationInfo::getNumTemplates
unsigned getNumTemplates() const
Returns the number of function templates that this might be a specialization of.
Definition: DeclTemplate.h:727
clang::ImportDecl::getIdentifierLocs
ArrayRef< SourceLocation > getIdentifierLocs() const
Retrieves the locations of each of the identifiers that make up the complete module name in the impor...
Definition: Decl.cpp:5364
clang::ASTDeclWriter::VisitConstructorUsingShadowDecl
void VisitConstructorUsingShadowDecl(ConstructorUsingShadowDecl *D)
Definition: ASTWriterDecl.cpp:1335
clang::serialization::DECL_OBJC_TYPE_PARAM
@ DECL_OBJC_TYPE_PARAM
An ObjCTypeParamDecl record.
Definition: ASTBitCodes.h:1500
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:3145
clang::serialization::DECL_MS_GUID
@ DECL_MS_GUID
A MSGuidDecl record.
Definition: ASTBitCodes.h:1298
clang::CapturedDecl::getParam
ImplicitParamDecl * getParam(unsigned i) const
Definition: Decl.h:4547
clang::ObjCMethodDecl::getEndLoc
SourceLocation getEndLoc() const LLVM_READONLY
Definition: DeclObjC.cpp:1010
clang::ObjCAtDefsFieldDecl::classofKind
static bool classofKind(Kind K)
Definition: DeclObjC.h:2017
clang::ASTDeclWriter::VisitFriendTemplateDecl
void VisitFriendTemplateDecl(FriendTemplateDecl *D)
Definition: ASTWriterDecl.cpp:1503
clang::Redeclarable::getPreviousDecl
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
Definition: Redeclarable.h:204
clang::ObjCMethodDecl::getReturnTypeSourceInfo
TypeSourceInfo * getReturnTypeSourceInfo() const
Definition: DeclObjC.h:346
clang::serialization::DECL_TOP_LEVEL_STMT_DECL
@ DECL_TOP_LEVEL_STMT_DECL
A TopLevelStmtDecl record.
Definition: ASTBitCodes.h:1322
clang::serialization::DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK
@ DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK
A TemplateTemplateParmDecl record that stores an expanded template template parameter pack.
Definition: ASTBitCodes.h:1472
clang::OMPDeclareReductionDecl::getCombinerIn
Expr * getCombinerIn()
Get In variable of the combiner.
Definition: DeclOpenMP.h:224
clang::EnumDecl::isScopedUsingClassTag
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3913
clang::BlockVarCopyInit
Copy initialization expr of a __block variable and a boolean flag that indicates whether the expressi...
Definition: Expr.h:6022
clang::ASTWriter
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:85
clang::ClassTemplateSpecializationDecl::getTemplateInstantiationArgs
const TemplateArgumentList & getTemplateInstantiationArgs() const
Retrieve the set of template arguments that should be used to instantiate members of the class templa...
Definition: DeclTemplate.h:2009
clang::RecordDecl::isParamDestroyedInCallee
bool isParamDestroyedInCallee() const
Definition: Decl.h:4145
clang::UnresolvedUsingValueDecl
Represents a dependent using declaration which was not marked with typename.
Definition: DeclCXX.h:3762
clang::ObjCPropertyDecl::getType
QualType getType() const
Definition: DeclObjC.h:799
clang::Redeclarable::isFirstDecl
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
Definition: Redeclarable.h:223
clang::TagDecl::isCompleteDefinition
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition: Decl.h:3528
clang::ObjCImplementationDecl::getIvarLBraceLoc
SourceLocation getIvarLBraceLoc() const
Definition: DeclObjC.h:2707
clang::ASTDeclWriter::VisitObjCMethodDecl
void VisitObjCMethodDecl(ObjCMethodDecl *D)
Definition: ASTWriterDecl.cpp:693
clang::ASTDeclWriter::VisitIndirectFieldDecl
void VisitIndirectFieldDecl(IndirectFieldDecl *D)
Definition: ASTWriterDecl.cpp:993
clang::NamespaceDecl::isOriginalNamespace
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
Definition: DeclCXX.cpp:2930
clang::ASTDeclWriter::VisitEnumConstantDecl
void VisitEnumConstantDecl(EnumConstantDecl *D)
Definition: ASTWriterDecl.cpp:519
clang::serialization::EXPR_DECL_REF
@ EXPR_DECL_REF
A DeclRefExpr record.
Definition: ASTBitCodes.h:1614
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1205
clang::ParmVarDecl::getFunctionScopeDepth
unsigned getFunctionScopeDepth() const
Definition: Decl.h:1762
clang::RecordDecl::isAnonymousStructOrUnion
bool isAnonymousStructOrUnion() const
Whether this is an anonymous struct or union.
Definition: Decl.h:4056
clang::ClassTemplateSpecializationDecl::getSpecializedTemplateOrPartial
llvm::PointerUnion< ClassTemplateDecl *, ClassTemplatePartialSpecializationDecl * > getSpecializedTemplateOrPartial() const
Retrieve the class template or class template partial specialization which was specialized by this.
Definition: DeclTemplate.h:1990
clang::Decl::isImplicit
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:576
clang::TemplateParamObjectDecl
A template parameter object.
Definition: DeclTemplate.h:3349
clang::ASTContext::getInstantiatedFromUsingDecl
NamedDecl * getInstantiatedFromUsingDecl(NamedDecl *Inst)
If the given using decl Inst is an instantiation of another (possibly unresolved) using decl,...
Definition: ASTContext.cpp:1566
clang::ObjCImplementationDecl::getSuperClass
const ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.h:2700
clang::Decl::getOwningModule
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition: DeclBase.h:808
clang::FieldDecl::isMutable
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:3005
clang::MemberSpecializationInfo::getPointOfInstantiation
SourceLocation getPointOfInstantiation() const
Retrieve the first point of instantiation of this member.
Definition: DeclTemplate.h:670
clang::StaticAssertDecl::isFailed
bool isFailed() const
Definition: DeclCXX.h:3988
clang::RecordDecl::isNonTrivialToPrimitiveCopy
bool isNonTrivialToPrimitiveCopy() const
Definition: Decl.h:4090
clang::FieldDecl::getCapturedVLAType
const VariableArrayType * getCapturedVLAType() const
Get the captured variable length array type.
Definition: Decl.h:3108
clang::serialization::DECL_OBJC_IMPLEMENTATION
@ DECL_OBJC_IMPLEMENTATION
A ObjCImplementationDecl record.
Definition: ASTBitCodes.h:1280
clang::TemplateDecl::getTemplateParameters
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Definition: DeclTemplate.h:427
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3414
clang::GVA_Internal
@ GVA_Internal
Definition: Linkage.h:74
clang::NamedDecl::getMostRecentDecl
NamedDecl * getMostRecentDecl()
Definition: Decl.h:473
clang::TopLevelStmtDecl
A declaration that models statements at global scope.
Definition: Decl.h:4285
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2293
clang::serialization::DECL_FRIEND
@ DECL_FRIEND
A FriendDecl record.
Definition: ASTBitCodes.h:1410
clang::VarDecl::getDescribedVarTemplate
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
Definition: Decl.cpp:2703
clang::ClassTemplateSpecializationDecl::getTypeAsWritten
TypeSourceInfo * getTypeAsWritten() const
Gets the type of this specialization as it was written by the user, if it was so written.
Definition: DeclTemplate.h:2048
clang::serialization::DECL_OBJC_PROTOCOL
@ DECL_OBJC_PROTOCOL
A ObjCProtocolDecl record.
Definition: ASTBitCodes.h:1265
clang::VarTemplateSpecializationDecl::getPointOfInstantiation
SourceLocation getPointOfInstantiation() const
Get the point of instantiation (if any), or null if none.
Definition: DeclTemplate.h:2816
clang::CXXDeductionGuideDecl::getExplicitSpecifier
ExplicitSpecifier getExplicitSpecifier()
Definition: DeclCXX.h:1918
clang::serialization::DECL_BLOCK
@ DECL_BLOCK
A BlockDecl record.
Definition: ASTBitCodes.h:1325
clang::serialization::DECL_OMP_DECLARE_REDUCTION
@ DECL_OMP_DECLARE_REDUCTION
An OMPDeclareReductionDecl record.
Definition: ASTBitCodes.h:1515
clang::ExplicitSpecifier::getExpr
const Expr * getExpr() const
Definition: DeclCXX.h:1839
clang::VarDecl::isThisDeclarationADemotedDefinition
bool isThisDeclarationADemotedDefinition() const
If this definition should pretend to be a declaration.
Definition: Decl.h:1416
clang::VarTemplateDecl::getCanonicalDecl
VarTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
Definition: DeclTemplate.h:3178
clang::TemplateTypeParmDecl::wasDeclaredWithTypename
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
Definition: DeclTemplate.h:1264
clang::RedeclarableTemplateDecl::SpecEntryTraits::getDecl
static DeclType * getDecl(EntryType *D)
Definition: DeclTemplate.h:785
clang::ParmVarDecl::getUninstantiatedDefaultArg
Expr * getUninstantiatedDefaultArg()
Definition: Decl.cpp:2927
clang::UnresolvedUsingValueDecl::getEllipsisLoc
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
Definition: DeclCXX.h:3821
clang::ASTDeclWriter::VisitObjCPropertyImplDecl
void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D)
Definition: ASTWriterDecl.cpp:914
clang::ASTDeclWriter::VisitObjCAtDefsFieldDecl
void VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D)
Definition: ASTWriterDecl.cpp:840
clang::FunctionDecl::getInstantiatedFromDecl
FunctionDecl * getInstantiatedFromDecl() const
Definition: Decl.cpp:3820
clang::FriendTemplateDecl::getFriendType
TypeSourceInfo * getFriendType() const
If this friend declaration names a templated type (or a dependent member type of a templated type),...
Definition: DeclTemplate.h:2507
clang::ObjCMethodDecl::getObjCDeclQualifier
ObjCDeclQualifier getObjCDeclQualifier() const
Definition: DeclObjC.h:249
clang::StaticAssertDecl::getAssertExpr
Expr * getAssertExpr()
Definition: DeclCXX.h:3982
clang::NamespaceAliasDecl::getNamespace
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
Definition: DeclCXX.h:3094
clang::serialization::DeclCode
DeclCode
Record codes for each kind of declaration.
Definition: ASTBitCodes.h:1239
clang::ASTDeclWriter::ASTDeclWriter
ASTDeclWriter(ASTWriter &Writer, ASTContext &Context, ASTWriter::RecordDataImpl &Record)
Definition: ASTWriterDecl.cpp:43
clang::UsingEnumDecl
Represents a C++ using-enum-declaration.
Definition: DeclCXX.h:3614
clang::UsingPackDecl::getInstantiatedFromUsingDecl
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
Definition: DeclCXX.h:3725
clang::HLSLBufferDecl
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
Definition: Decl.h:4757
clang::TemplateTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1755
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::serialization::UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION
@ UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION
Definition: ASTCommon.h:26
clang::LinkageSpecDecl::getLanguage
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition: DeclCXX.h:2861
clang::serialization::DECL_EXPORT
@ DECL_EXPORT
An ExportDecl record.
Definition: ASTBitCodes.h:1386
clang::DeclContext::getRedeclContext
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
Definition: DeclBase.cpp:1829
clang::ObjCCategoryImplDecl::getCategoryNameLoc
SourceLocation getCategoryNameLoc() const
Definition: DeclObjC.h:2540
clang::ASTDeclWriter::VisitOMPAllocateDecl
void VisitOMPAllocateDecl(OMPAllocateDecl *D)
Definition: ASTWriterDecl.cpp:1906
clang::declvisitor::Base< std::add_pointer, ImplClass, void >::Visit
void Visit(PTR(Decl) D)
Definition: DeclVisitor.h:37
P
StringRef P
Definition: ASTMatchersInternal.cpp:564
clang::ObjCContainerDecl::getAtStartLoc
SourceLocation getAtStartLoc() const
Definition: DeclObjC.h:1091
clang::TypedefNameDecl::getAnonDeclWithTypedefName
TagDecl * getAnonDeclWithTypedefName(bool AnyRedecl=false) const
Retrieves the tag declaration for which this is the typedef name for linkage purposes,...
Definition: Decl.cpp:5155
clang::ClassTemplatePartialSpecializationDecl::getTemplateArgsAsWritten
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Get the template arguments as written.
Definition: DeclTemplate.h:2174
clang::ASTDeclWriter::VisitObjCInterfaceDecl
void VisitObjCInterfaceDecl(ObjCInterfaceDecl *D)
Definition: ASTWriterDecl.cpp:758
clang::serialization::DECL_OBJC_METHOD
@ DECL_OBJC_METHOD
A ObjCMethodDecl record.
Definition: ASTBitCodes.h:1259
clang::FunctionDecl::usesSEHTry
bool usesSEHTry() const
Indicates the function uses __try.
Definition: Decl.h:2387
clang::ASTDeclWriter::VisitEmptyDecl
void VisitEmptyDecl(EmptyDecl *D)
Definition: ASTWriterDecl.cpp:1181
clang::ASTDeclWriter::VisitTemplateParamObjectDecl
void VisitTemplateParamObjectDecl(TemplateParamObjectDecl *D)
Definition: ASTWriterDecl.cpp:987
clang::Decl::getPreviousDecl
Decl * getPreviousDecl()
Retrieve the previous declaration that declares the same entity as this declaration,...
Definition: DeclBase.h:1026
clang::ObjCPropertyImplDecl::getBeginLoc
SourceLocation getBeginLoc() const LLVM_READONLY
Definition: DeclObjC.h:2831
clang::FunctionTemplateSpecializationInfo
Provides information about a function template specialization, which is a FunctionDecl that has been ...
Definition: DeclTemplate.h:478
clang::NonTypeTemplateParmDecl::getExpansionTypeSourceInfo
TypeSourceInfo * getExpansionTypeSourceInfo(unsigned I) const
Retrieve a particular expansion type source info within an expanded parameter pack.
Definition: DeclTemplate.h:1576
clang::EnumDecl::isScoped
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3910
clang::ASTDeclWriter::VisitImplicitParamDecl
void VisitImplicitParamDecl(ImplicitParamDecl *D)
Definition: ASTWriterDecl.cpp:1100
clang::ObjCCategoryDecl::protocol_locs
protocol_loc_range protocol_locs() const
Definition: DeclObjC.h:2383
clang::Decl::hasAttrs
bool hasAttrs() const
Definition: DeclBase.h:502
clang::TagDecl::getBraceRange
SourceRange getBraceRange() const
Definition: Decl.h:3504
clang::CXXMethodDecl::size_overridden_methods
unsigned size_overridden_methods() const
Definition: DeclCXX.cpp:2461
clang::ASTRecordWriter::append
void append(InputIterator begin, InputIterator end)
Definition: ASTRecordWriter.h:81
clang::Decl::isFromASTFile
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
Definition: DeclBase.h:751
clang::NonTypeTemplateParmDecl::getDefaultArgument
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1489
clang::TemplateTypeParmDecl::getTypeConstraint
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
Definition: DeclTemplate.h:1369
clang::ASTDeclWriter::VisitBlockDecl
void VisitBlockDecl(BlockDecl *D)
Definition: ASTWriterDecl.cpp:1197
clang::ASTDeclWriter::VisitDecompositionDecl
void VisitDecompositionDecl(DecompositionDecl *D)
Definition: ASTWriterDecl.cpp:1152
clang::ASTDeclWriter::VisitTypedefNameDecl
void VisitTypedefNameDecl(TypedefNameDecl *D)
Definition: ASTWriterDecl.cpp:380
clang::StaticAssertDecl
Represents a C++11 static_assert declaration.
Definition: DeclCXX.h:3959
clang::TagDecl::isFreeStanding
bool isFreeStanding() const
True if this tag is free standing, e.g. "struct foo;".
Definition: Decl.h:3563
clang::serialization::DECL_OMP_ALLOCATE
@ DECL_OMP_ALLOCATE
An OMPAllocateDcl record.
Definition: ASTBitCodes.h:1488
clang::ASTTemplateArgumentListInfo::LAngleLoc
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
Definition: TemplateBase.h:628
clang::ClassTemplateDecl
Declaration of a class template.
Definition: DeclTemplate.h:2270
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:701
clang::serialization::DECL_VAR
@ DECL_VAR
A VarDecl record.
Definition: ASTBitCodes.h:1304
clang::DependentFunctionTemplateSpecializationInfo::getRAngleLoc
SourceLocation getRAngleLoc() const
Definition: DeclTemplate.h:757
clang::VarDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:1115
clang::ASTDeclWriter::VisitClassTemplateSpecializationDecl
void VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D)
Definition: ASTWriterDecl.cpp:1567
clang::serialization::DECL_ACCESS_SPEC
@ DECL_ACCESS_SPEC
An AccessSpecDecl record.
Definition: ASTBitCodes.h:1407
clang::ImplicitConceptSpecializationDecl
Definition: DeclTemplate.h:3306
clang::serialization::DECL_UNRESOLVED_USING_VALUE
@ DECL_UNRESOLVED_USING_VALUE
An UnresolvedUsingValueDecl record.
Definition: ASTBitCodes.h:1377
clang::OMPCapturedExprDecl
Pseudo declaration for capturing expressions.
Definition: DeclOpenMP.h:383
clang::ASTDeclWriter::VisitLabelDecl
void VisitLabelDecl(LabelDecl *LD)
Definition: ASTWriterDecl.cpp:1251
clang::ObjCImplDecl
Definition: DeclObjC.h:2438
clang::FunctionDecl::isMultiVersion
bool isMultiVersion() const
True if this function is considered a multiversioned function.
Definition: Decl.h:2506
clang::OMPDeclareReductionDecl::getInitOrig
Expr * getInitOrig()
Get Orig variable of the initializer.
Definition: DeclOpenMP.h:246
clang::ObjCPropertyDecl::getLParenLoc
SourceLocation getLParenLoc() const
Definition: DeclObjC.h:794
clang::LifetimeExtendedTemporaryDecl::getValue
APValue * getValue() const
Definition: DeclCXX.h:3186
clang::serialization::DECL_TEMPLATE_PARAM_OBJECT
@ DECL_TEMPLATE_PARAM_OBJECT
A TemplateParamObjectDecl record.
Definition: ASTBitCodes.h:1301
clang::serialization::LOCAL_REDECLARATIONS
const unsigned int LOCAL_REDECLARATIONS
Record code for a list of local redeclarations of a declaration.
Definition: ASTBitCodes.h:1231
clang::DeclContext::getParent
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Definition: DeclBase.h:1923
clang::ObjCCategoryDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2369
clang::ObjCCompatibleAliasDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2758
clang::serialization::DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK
@ DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK
A NonTypeTemplateParmDecl record that stores an expanded non-type template parameter pack.
Definition: ASTBitCodes.h:1468
clang::ObjCInterfaceDecl::protocol_locs
protocol_loc_range protocol_locs() const
Definition: DeclObjC.h:1371
clang::ParmVarDecl::isObjCMethodParameter
bool isObjCMethodParameter() const
Definition: Decl.h:1755
clang::TemplateDecl
The base class of all kinds of template declarations (e.g., class, function, etc.).
Definition: DeclTemplate.h:408
clang::NonTypeTemplateParmDecl::isExpandedParameterPack
bool isExpandedParameterPack() const
Whether this parameter is a non-type template parameter pack that has a known list of different types...
Definition: DeclTemplate.h:1556
clang::VarTemplatePartialSpecializationDecl
Definition: DeclTemplate.h:2949
clang::ObjCMethodDecl::isSynthesizedAccessorStub
bool isSynthesizedAccessorStub() const
Definition: DeclObjC.h:448
llvm::ArrayRef
Definition: LLVM.h:34
DeclVisitor.h
Value
Value
Definition: UninitializedValues.cpp:103
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::MSGuidDeclParts::Part2
uint16_t Part2
...-89ab-...
Definition: DeclCXX.h:4169
clang::PrettyDeclStackTraceEntry
PrettyDeclStackTraceEntry - If a crash occurs in the parser while parsing something related to a decl...
Definition: PrettyDeclStackTrace.h:29
clang::ASTDeclWriter::VisitNamespaceAliasDecl
void VisitNamespaceAliasDecl(NamespaceAliasDecl *D)
Definition: ASTWriterDecl.cpp:1285
clang::ObjCPropertyDecl::getPropertyIvarDecl
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:919
clang::ParmVarDecl::getFunctionScopeIndex
unsigned getFunctionScopeIndex() const
Returns the index of this parameter in its prototype or method scope.
Definition: Decl.h:1772
OpenMPClause.h
clang::DeclaratorDecl
Represents a ValueDecl that came out of a declarator.
Definition: Decl.h:758
clang::FunctionDecl::isPure
bool isPure() const
Whether this virtual function is pure, i.e.
Definition: Decl.h:2244
clang::NamespaceAliasDecl::getTargetNameLoc
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
Definition: DeclCXX.h:3113
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:731
clang::UsingDecl::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Definition: DeclCXX.h:3448
clang::ASTDeclWriter::VisitAccessSpecDecl
void VisitAccessSpecDecl(AccessSpecDecl *D)
Definition: ASTWriterDecl.cpp:1478
clang::CXXConstructorDecl::getInheritedConstructor
InheritedConstructor getInheritedConstructor() const
Get the constructor that this inheriting constructor is based on.
Definition: DeclCXX.h:2676
clang::ObjCMethodDecl::isInstanceMethod
bool isInstanceMethod() const
Definition: DeclObjC.h:430
clang::ASTDeclWriter::VisitTopLevelStmtDecl
void VisitTopLevelStmtDecl(TopLevelStmtDecl *D)
Definition: ASTWriterDecl.cpp:1175
clang::ASTDeclWriter::VisitClassTemplateDecl
void VisitClassTemplateDecl(ClassTemplateDecl *D)
Definition: ASTWriterDecl.cpp:1559
clang::FunctionDecl::isTrivialForCall
bool isTrivialForCall() const
Definition: Decl.h:2264
clang::ClassScopeFunctionSpecializationDecl::getSpecialization
CXXMethodDecl * getSpecialization() const
Definition: DeclTemplate.h:2646
clang::ASTDeclWriter::VisitCXXMethodDecl
void VisitCXXMethodDecl(CXXMethodDecl *D)
Definition: ASTWriterDecl.cpp:1409
clang::CapturedDecl::isNothrow
bool isNothrow() const
Definition: Decl.cpp:5094
clang::FunctionDecl::TK_NonTemplate
@ TK_NonTemplate
Definition: Decl.h:1913
clang::SD_Static
@ SD_Static
Static storage duration.
Definition: Specifiers.h:315
clang::NamedDecl::getLinkageInternal
Linkage getLinkageInternal() const
Determine what kind of linkage this entity has.
Definition: Decl.cpp:1158
clang::UnresolvedUsingValueDecl::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Definition: DeclCXX.h:3804
clang::ObjCTypeParamList::size
unsigned size() const
Determine the number of type parameters in this list.
Definition: DeclObjC.h:687
clang::NonTypeTemplateParmDecl::getDepth
unsigned getDepth() const
Get the nesting depth of the template parameter.
Definition: DeclTemplate.h:1180
clang::NamespaceAliasDecl::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
Definition: DeclCXX.h:3085
clang::CXXRecordDecl::getPreviousDecl
CXXRecordDecl * getPreviousDecl()
Definition: DeclCXX.h:510
clang::ObjCPropertyDecl::getGetterNameLoc
SourceLocation getGetterNameLoc() const
Definition: DeclObjC.h:881
clang::ASTDeclWriter::VisitStaticAssertDecl
void VisitStaticAssertDecl(StaticAssertDecl *D)
Definition: ASTWriterDecl.cpp:1798
clang::ClassTemplateDecl::getCanonicalDecl
ClassTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
Definition: DeclTemplate.h:2347
clang::DependentFunctionTemplateSpecializationInfo::getTemplate
FunctionTemplateDecl * getTemplate(unsigned I) const
Returns the i'th template candidate.
Definition: DeclTemplate.h:730
clang::ObjCCategoryDecl::getIvarLBraceLoc
SourceLocation getIvarLBraceLoc() const
Definition: DeclObjC.h:2430
clang::serialization::DECL_ENUM_CONSTANT
@ DECL_ENUM_CONSTANT
An EnumConstantDecl record.
Definition: ASTBitCodes.h:1253
clang::PragmaCommentDecl
Represents a #pragma comment line.
Definition: Decl.h:138
clang::CXXConversionDecl::getExplicitSpecifier
ExplicitSpecifier getExplicitSpecifier()
Definition: DeclCXX.h:2793
clang::ASTDeclWriter::RegisterTemplateSpecialization
void RegisterTemplateSpecialization(const Decl *Template, const Decl *Specialization)
Ensure that this template specialization is associated with the specified template on reload.
Definition: ASTWriterDecl.cpp:252
clang::UsingEnumDecl::getEnumType
TypeSourceInfo * getEnumType() const
Definition: DeclCXX.h:3652
clang::serialization::DECL_MS_PROPERTY
@ DECL_MS_PROPERTY
A MSPropertyDecl record.
Definition: ASTBitCodes.h:1295
clang::CapturedDecl::getContextParamPosition
unsigned getContextParamPosition() const
Definition: Decl.h:4574
clang::UsingDirectiveDecl::getCommonAncestor
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
Definition: DeclCXX.h:2984
clang::serialization::DECL_OBJC_CATEGORY_IMPL
@ DECL_OBJC_CATEGORY_IMPL
A ObjCCategoryImplDecl record.
Definition: ASTBitCodes.h:1277
clang::ASTDeclWriter::VisitObjCCompatibleAliasDecl
void VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *D)
Definition: ASTWriterDecl.cpp:860
clang::serialization::DECL_CONCEPT
@ DECL_CONCEPT
A ConceptDecl record.
Definition: ASTBitCodes.h:1449
clang::RecordDecl::hasObjectMember
bool hasObjectMember() const
Definition: Decl.h:4064
clang::ASTRecordWriter
An object for streaming information to a record.
Definition: ASTRecordWriter.h:27
clang::ObjCImplementationDecl::getIvarRBraceLoc
SourceLocation getIvarRBraceLoc() const
Definition: DeclObjC.h:2709
clang::Redeclarable::getMostRecentDecl
decl_type * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
Definition: Redeclarable.h:226
clang::ObjCImplementationDecl::hasNonZeroConstructors
bool hasNonZeroConstructors() const
Do any of the ivars of this class (not counting its base classes) require construction other than zer...
Definition: DeclObjC.h:2667
clang::ObjCAtDefsFieldDecl
Represents a field declaration created by an @defs(...).
Definition: DeclObjC.h:1997
clang::VarDecl::getInit
const Expr * getInit() const
Definition: Decl.h:1315
clang::FunctionDecl::FriendConstraintRefersToEnclosingTemplate
bool FriendConstraintRefersToEnclosingTemplate() const
Definition: Decl.h:2524
clang::VarTemplateSpecializationDecl::getExternLoc
SourceLocation getExternLoc() const
Gets the location of the extern keyword, if present.
Definition: DeclTemplate.h:2906
clang::ASTDeclWriter::VisitOMPRequiresDecl
void VisitOMPRequiresDecl(OMPRequiresDecl *D)
Definition: ASTWriterDecl.cpp:1912
clang::RecordDecl::hasNonTrivialToPrimitiveDefaultInitializeCUnion
bool hasNonTrivialToPrimitiveDefaultInitializeCUnion() const
Definition: Decl.h:4106
clang::ASTDeclWriter::VisitObjCPropertyDecl
void VisitObjCPropertyDecl(ObjCPropertyDecl *D)
Definition: ASTWriterDecl.cpp:866
clang::serialization::DECL_TYPEDEF
@ DECL_TYPEDEF
A TypedefDecl record.
Definition: ASTBitCodes.h:1241
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3377
clang::LinkageSpecDecl::getRBraceLoc
SourceLocation getRBraceLoc() const
Definition: DeclCXX.h:2876
clang::serialization::isRedeclarableDeclKind
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
Definition: ASTCommon.cpp:347
ASTRecordWriter.h
clang::ASTDeclWriter::VisitParmVarDecl
void VisitParmVarDecl(ParmVarDecl *D)
Definition: ASTWriterDecl.cpp:1105
clang::OMPDeclareReductionDecl::getCombiner
Expr * getCombiner()
Get combiner expression of the declare reduction construct.
Definition: DeclOpenMP.h:221
clang::ObjCPropertyImplDecl::getPropertyDecl
ObjCPropertyDecl * getPropertyDecl() const
Definition: DeclObjC.h:2834
clang::MemberSpecializationInfo::getInstantiatedFrom
NamedDecl * getInstantiatedFrom() const
Retrieve the member declaration from which this member was instantiated.
Definition: DeclTemplate.h:649
clang::VarDecl::isPreviousDeclInSameBlockScope
bool isPreviousDeclInSameBlockScope() const
Whether this local extern variable declaration's previous declaration was declared in the same block ...
Definition: Decl.h:1532
clang::VarTemplateSpecializationDecl::getSpecializedTemplateOrPartial
llvm::PointerUnion< VarTemplateDecl *, VarTemplatePartialSpecializationDecl * > getSpecializedTemplateOrPartial() const
Retrieve the variable template or variable template partial specialization which was specialized by t...
Definition: DeclTemplate.h:2843
clang::VarDecl::getTSCSpec
ThreadStorageClassSpecifier getTSCSpec() const
Definition: Decl.h:1124
clang::ObjCPropertyDecl::getPropertyAttributesAsWritten
ObjCPropertyAttribute::Kind getPropertyAttributesAsWritten() const
Definition: DeclObjC.h:822
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::LifetimeExtendedTemporaryDecl::getTemporaryExpr
Expr * getTemporaryExpr()
Retrieve the expression to which the temporary materialization conversion was applied.
Definition: DeclCXX.h:3177
clang::LinkageSpecDecl::getExternLoc
SourceLocation getExternLoc() const
Definition: DeclCXX.h:2875
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:581
clang::ObjCPropertyDecl::getGetterName
Selector getGetterName() const
Definition: DeclObjC.h:880
clang::ObjCPropertyDecl::getSetterNameLoc
SourceLocation getSetterNameLoc() const
Definition: DeclObjC.h:889
clang::VarDecl::isARCPseudoStrong
bool isARCPseudoStrong() const
Determine whether this variable is an ARC pseudo-__strong variable.
Definition: Decl.h:1487
clang::ObjCMethodDecl::getBody
Stmt * getBody() const override
Retrieve the body of this method, if it has one.
Definition: DeclObjC.cpp:872
clang::ASTDeclWriter::VisitObjCProtocolDecl
void VisitObjCProtocolDecl(ObjCProtocolDecl *D)
Definition: ASTWriterDecl.cpp:823
clang::VarDecl::isCXXForRangeDecl
bool isCXXForRangeDecl() const
Determine whether this variable is the for-range-declaration in a C++0x for-range statement.
Definition: Decl.h:1462
clang::ASTRecordWriter::AddDeclRef
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
Definition: ASTRecordWriter.h:226
clang::NamespaceDecl::isAnonymousNamespace
bool isAnonymousNamespace() const
Returns true if this is an anonymous namespace declaration.
Definition: Decl.h:602
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:139
clang::ASTDeclWriter::VisitConceptDecl
void VisitConceptDecl(ConceptDecl *D)
Definition: ASTWriterDecl.cpp:1524
clang::serialization::DECL_FUNCTION
@ DECL_FUNCTION
A FunctionDecl record.
Definition: ASTBitCodes.h:1256
clang::CXXDeductionGuideDecl
Represents a C++ deduction guide declaration.
Definition: DeclCXX.h:1885
clang::serialization::DECL_INDIRECTFIELD
@ DECL_INDIRECTFIELD
A IndirectFieldDecl record.
Definition: ASTBitCodes.h:1464
clang::OMPDeclareReductionDecl::getInitializerKind
InitKind getInitializerKind() const
Get initializer kind.
Definition: DeclOpenMP.h:242
clang::FileScopeAsmDecl
Definition: Decl.h:4248
clang::ObjCInterfaceDecl::getEndOfDefinitionLoc
SourceLocation getEndOfDefinitionLoc() const
Definition: DeclObjC.h:1853
clang::FunctionDecl::isLateTemplateParsed
bool isLateTemplateParsed() const
Whether this templated function will be late parsed.
Definition: Decl.h:2248
clang::ObjCMethodDecl::getCmdDecl
ImplicitParamDecl * getCmdDecl() const
Definition: DeclObjC.h:424
clang::VarDecl::CInit
@ CInit
C-style initialization with assignment.
Definition: Decl.h:911
clang::UnresolvedUsingValueDecl::getUsingLoc
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
Definition: DeclCXX.h:3794
clang::DeclarationName::getNameKind
NameKind getNameKind() const
Determine what kind of name this is.
Definition: DeclarationName.h:393
clang::ASTDeclWriter::VisitUnnamedGlobalConstantDecl
void VisitUnnamedGlobalConstantDecl(UnnamedGlobalConstantDecl *D)
Definition: ASTWriterDecl.cpp:980
clang::ASTDeclWriter::VisitOMPDeclareMapperDecl
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D)
Definition: ASTWriterDecl.cpp:1932
clang::Builtin::ID
ID
Definition: Builtins.h:52
clang::ObjCTypeParamList
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
Definition: DeclObjC.h:659
clang::TemplateTemplateParmDecl::getDefaultArgument
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1745
clang
Definition: CalledOnceCheck.h:17
clang::IndirectFieldDecl
Represents a field injected from an anonymous union/struct into the parent scope.
Definition: Decl.h:3184
clang::TemplateTypeParmDecl::getNumExpansionParameters
unsigned getNumExpansionParameters() const
Retrieves the number of parameters in an expanded parameter pack.
Definition: DeclTemplate.h:1362
clang::GVA_StrongExternal
@ GVA_StrongExternal
Definition: Linkage.h:77
clang::ASTRecordWriter::Emit
uint64_t Emit(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, followed by its substatements, and return its offset.
Definition: ASTRecordWriter.h:92
clang::UnnamedGlobalConstantDecl::getValue
const APValue & getValue() const
Definition: DeclCXX.h:4273
clang::ObjCPropertyDecl::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo() const
Definition: DeclObjC.h:797
clang::MSGuidDeclParts::Part4And5
uint8_t Part4And5[8]
...-0123-456789abcdef}
Definition: DeclCXX.h:4173
clang::serialization::DECL_TEMPLATE_TYPE_PARM
@ DECL_TEMPLATE_TYPE_PARM
A TemplateTypeParmDecl record.
Definition: ASTBitCodes.h:1437
clang::FileScopeAsmDecl::getAsmString
const StringLiteral * getAsmString() const
Definition: Decl.h:4272
clang::ASTDeclWriter::getPartialSpecializations
ArrayRef< Decl > getPartialSpecializations(FunctionTemplateDecl::Common *)
Definition: ASTWriterDecl.cpp:207
clang::TypeAliasDecl::getDescribedAliasTemplate
TypeAliasTemplateDecl * getDescribedAliasTemplate() const
Definition: Decl.h:3414
clang::GVA_AvailableExternally
@ GVA_AvailableExternally
Definition: Linkage.h:75
clang::ObjCInterfaceDecl::getSuperClassTInfo
TypeSourceInfo * getSuperClassTInfo() const
Definition: DeclObjC.h:1549
clang::NonTypeTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Definition: DeclTemplate.h:1521
clang::EnumDecl::getNumNegativeBits
unsigned getNumNegativeBits() const
Returns the width in bits required to store all the negative enumerators of this enum.
Definition: Decl.h:3902
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1920
clang::ParmVarDecl::isKNRPromoted
bool isKNRPromoted() const
True if the value passed to this parameter must undergo K&R-style default argument promotion:
Definition: Decl.h:1793
clang::VarDecl::isConstexpr
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition: Decl.h:1509
ASTReader.h
clang::ObjCCategoryDecl::getIvarRBraceLoc
SourceLocation getIvarRBraceLoc() const
Definition: DeclObjC.h:2432
clang::MSPropertyDecl
An instance of this class represents the declaration of a property member.
Definition: DeclCXX.h:4136
clang::UsingDecl::hasTypename
bool hasTypename() const
Return true if the using declaration has 'typename'.
Definition: DeclCXX.h:3463
clang::ParmVarDecl::hasUninstantiatedDefaultArg
bool hasUninstantiatedDefaultArg() const
Definition: Decl.h:1833
clang::DeclVisitor
A simple visitor class that helps create declaration visitors.
Definition: DeclVisitor.h:66
clang::ASTDeclWriter::VisitRecordDecl
void VisitRecordDecl(RecordDecl *D)
Definition: ASTWriterDecl.cpp:479
clang::serialization::DECL_LIFETIME_EXTENDED_TEMPORARY
@ DECL_LIFETIME_EXTENDED_TEMPORARY
An LifetimeExtendedTemporaryDecl record.
Definition: ASTBitCodes.h:1494
clang::ASTDeclWriter::VisitTemplateTemplateParmDecl
void VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D)
Definition: ASTWriterDecl.cpp:1764
clang::TemplateTemplateParmDecl::isExpandedParameterPack
bool isExpandedParameterPack() const
Whether this parameter is a template template parameter pack that has a known list of different templ...
Definition: DeclTemplate.h:1722
clang::EnumDecl::getIntegerType
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition: Decl.h:3865
clang::ASTDeclWriter::VisitUsingDirectiveDecl
void VisitUsingDirectiveDecl(UsingDirectiveDecl *D)
Definition: ASTWriterDecl.cpp:1344
clang::TagDecl::isCompleteDefinitionRequired
bool isCompleteDefinitionRequired() const
Return true if this complete decl is required to be complete for some existing use.
Definition: Decl.h:3537
clang::RecordDecl::isNonTrivialToPrimitiveDefaultInitialize
bool isNonTrivialToPrimitiveDefaultInitialize() const
Functions to query basic properties of non-trivial C structs.
Definition: Decl.h:4082
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2049
clang::CXXMethodDecl::getMostRecentDecl
CXXMethodDecl * getMostRecentDecl()
Definition: DeclCXX.h:2075
clang::RecordDecl::getMostRecentDecl
RecordDecl * getMostRecentDecl()
Definition: Decl.h:4030
clang::serialization::DECL_CXX_CONSTRUCTOR
@ DECL_CXX_CONSTRUCTOR
A CXXConstructorDecl record.
Definition: ASTBitCodes.h:1398
clang::SourceLocation::isValid
bool isValid() const
Return true if this is a valid SourceLocation object.
Definition: SourceLocation.h:110
clang::MSGuidDeclParts::Part3
uint16_t Part3
...-cdef-...
Definition: DeclCXX.h:4171
clang::NamedDecl::getDeclName
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:313
clang::UsingDirectiveDecl::getUsingLoc
SourceLocation getUsingLoc() const
Return the location of the using keyword.
Definition: DeclCXX.h:2988
clang::ClassTemplatePartialSpecializationDecl::isMemberSpecialization
bool isMemberSpecialization()
Determines whether this class template partial specialization template was a specialization of a memb...
Definition: DeclTemplate.h:2230
clang::OMPRequiresDecl
This represents '#pragma omp requires...' directive.
Definition: DeclOpenMP.h:416
clang::RedeclarableTemplateDecl::getInstantiatedFromMemberTemplate
RedeclarableTemplateDecl * getInstantiatedFromMemberTemplate() const
Retrieve the member template from which this template was instantiated, or nullptr if this template w...
Definition: DeclTemplate.h:956
clang::PragmaDetectMismatchDecl::getName
StringRef getName() const
Definition: Decl.h:195
clang::ObjCProtocolDecl::protocol_locs
protocol_loc_range protocol_locs() const
Definition: DeclObjC.h:2146
clang::serialization::DECL_IMPLICIT_CONCEPT_SPECIALIZATION
@ DECL_IMPLICIT_CONCEPT_SPECIALIZATION
An ImplicitConceptSpecializationDecl record.
Definition: ASTBitCodes.h:1524
clang::DeclContext::isDependentContext
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
Definition: DeclBase.cpp:1174
clang::ASTDeclWriter::VisitPragmaDetectMismatchDecl
void VisitPragmaDetectMismatchDecl(PragmaDetectMismatchDecl *D)
Definition: ASTWriterDecl.cpp:350
clang::ASTDeclWriter::VisitCXXDestructorDecl
void VisitCXXDestructorDecl(CXXDestructorDecl *D)
Definition: ASTWriterDecl.cpp:1444
clang::serialization::DECL_OMP_CAPTUREDEXPR
@ DECL_OMP_CAPTUREDEXPR
An OMPCapturedExprDecl record.
Definition: ASTBitCodes.h:1503
clang::NonTypeTemplateParmDecl::getPlaceholderTypeConstraint
Expr * getPlaceholderTypeConstraint() const
Return the constraint introduced by the placeholder type of this non-type template parameter (if any)...
Definition: DeclTemplate.h:1585
clang::ClassTemplateSpecializationDecl::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Gets the location of the template keyword, if present.
Definition: DeclTemplate.h:2072
clang::ASTDeclWriter::VisitUnresolvedUsingIfExistsDecl
void VisitUnresolvedUsingIfExistsDecl(UnresolvedUsingIfExistsDecl *D)
Definition: ASTWriterDecl.cpp:1372
clang::FunctionDecl::hasInheritedPrototype
bool hasInheritedPrototype() const
Whether this function inherited its prototype from a previous declaration.
Definition: Decl.h:2343
clang::FunctionDecl::isExplicitlyDefaulted
bool isExplicitlyDefaulted() const
Whether this function is explicitly defaulted.
Definition: Decl.h:2273
clang::UnresolvedUsingIfExistsDecl
This node is generated when a using-declaration that was annotated with attribute((using_if_exists)) ...
Definition: DeclCXX.h:3941
clang::BlockDecl::canAvoidCopyToHeap
bool canAvoidCopyToHeap() const
Definition: Decl.h:4465
clang::LifetimeExtendedTemporaryDecl::getExtendingDecl
ValueDecl * getExtendingDecl()
Definition: DeclCXX.h:3166
clang::ASTDeclWriter::VisitOMPCapturedExprDecl
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D)
Definition: ASTWriterDecl.cpp:1940
clang::TagDecl::getTagKind
TagKind getTagKind() const
Definition: Decl.h:3620
clang::ASTDeclWriter::VisitNonTypeTemplateParmDecl
void VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D)
Definition: ASTWriterDecl.cpp:1729
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3275
clang::RedeclarableTemplateDecl::SpecEntryTraits::DeclType
EntryType DeclType
Definition: DeclTemplate.h:783
clang::Decl::getAttrs
AttrVec & getAttrs()
Definition: DeclBase.h:508
clang::VarTemplateSpecializationDecl::getSpecializedTemplate
VarTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
Definition: DeclTemplate.cpp:1388
clang::ASTDeclWriter::VisitTemplateDecl
void VisitTemplateDecl(TemplateDecl *D)
Definition: ASTWriterDecl.cpp:1517
clang::ExplicitSpecifier::getKind
ExplicitSpecKind getKind() const
Definition: DeclCXX.h:1838
clang::ObjCContainerDecl
ObjCContainerDecl - Represents a container for method declarations.
Definition: DeclObjC.h:943
clang::FunctionTemplateSpecializationInfo::TemplateArgumentsAsWritten
const ASTTemplateArgumentListInfo * TemplateArgumentsAsWritten
The template arguments as written in the sources, if provided.
Definition: DeclTemplate.h:499
clang::ObjCCategoryDecl::getCategoryNameLoc
SourceLocation getCategoryNameLoc() const
Definition: DeclObjC.h:2426
clang::TypeAliasTemplateDecl
Declaration of an alias template.
Definition: DeclTemplate.h:2543
clang::ASTDeclWriter::VisitObjCTypeParamDecl
void VisitObjCTypeParamDecl(ObjCTypeParamDecl *D)
Definition: ASTWriterDecl.cpp:741
clang::FunctionDecl::getDependentSpecializationInfo
DependentFunctionTemplateSpecializationInfo * getDependentSpecializationInfo() const
Definition: Decl.cpp:3988
clang::BlockDecl::getSignatureAsWritten
TypeSourceInfo * getSignatureAsWritten() const
Definition: Decl.h:4394
clang::ASTDeclWriter::VisitTypedefDecl
void VisitTypedefDecl(TypedefDecl *D)
Definition: ASTWriterDecl.cpp:390
clang::ObjCMethodDecl::isPropertyAccessor
bool isPropertyAccessor() const
Definition: DeclObjC.h:440
clang::serialization::DECL_NAMESPACE_ALIAS
@ DECL_NAMESPACE_ALIAS
A NamespaceAliasDecl record.
Definition: ASTBitCodes.h:1356
clang::ConceptReference::getNestedNameSpecifierLoc
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
Definition: ASTConcept.h:138
clang::LifetimeExtendedTemporaryDecl
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Definition: DeclCXX.h:3129
clang::ObjCIvarDecl::classofKind
static bool classofKind(Kind K)
Definition: DeclObjC.h:1984
clang::BindingDecl::getBinding
Expr * getBinding() const
Get the expression to which this declaration is bound.
Definition: DeclCXX.h:4032
clang::ObjCMethodDecl::parameters
ArrayRef< ParmVarDecl * > parameters() const
Definition: DeclObjC.h:376
clang::interp::DeclTy
unsigned llvm::PointerUnion< const Decl *, const Expr * > DeclTy
Definition: Descriptor.h:26
clang::FunctionTemplateSpecializationInfo::getTemplateSpecializationKind
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template specialization this is.
Definition: DeclTemplate.h:540
Parent
NodeId Parent
Definition: ASTDiff.cpp:190
clang::ASTDeclWriter::Emit
uint64_t Emit(Decl *D)
Definition: ASTWriterDecl.cpp:48
clang::serialization::DECL_IMPORT
@ DECL_IMPORT
An ImportDecl recording a module import.
Definition: ASTBitCodes.h:1479
clang::ObjCMethodDecl::isRedeclaration
bool isRedeclaration() const
True if this is a method redeclaration in the same interface.
Definition: DeclObjC.h:269
clang::ConceptReference::getConceptNameInfo
const DeclarationNameInfo & getConceptNameInfo() const
Definition: ASTConcept.h:142
clang::ObjCPropertyDecl::getAtLoc
SourceLocation getAtLoc() const
Definition: DeclObjC.h:791
clang::ASTReader::getOwningModuleFile
ModuleFile * getOwningModuleFile(const Decl *D)
Retrieve the module file that owns the given declaration, or NULL if the declaration is not from a mo...
Definition: ASTReader.cpp:7436
clang::ASTDeclWriter::VisitLinkageSpecDecl
void VisitLinkageSpecDecl(LinkageSpecDecl *D)
Definition: ASTWriterDecl.cpp:1237
clang::PragmaDetectMismatchDecl
Represents a #pragma detect_mismatch line.
Definition: Decl.h:172
clang::ASTDeclWriter::VisitHLSLBufferDecl
void VisitHLSLBufferDecl(HLSLBufferDecl *D)
Definition: ASTWriterDecl.cpp:1889
clang::serialization::DECL_LABEL
@ DECL_LABEL
A LabelDecl record.
Definition: ASTBitCodes.h:1350
clang::UsingEnumDecl::getEnumLoc
SourceLocation getEnumLoc() const
The source location of the 'enum' keyword.
Definition: DeclCXX.h:3638
clang::DependentFunctionTemplateSpecializationInfo::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: DeclTemplate.h:753
llvm::SmallVectorImpl
Definition: Randstruct.h:18
clang::VarDecl::getInitStyle
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition: Decl.h:1406
clang::TypeAliasDecl
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3397
clang::NonTypeTemplateParmDecl::getPosition
unsigned getPosition() const
Get the position of the template parameter within its parameter list.
Definition: DeclTemplate.h:1188
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:712
clang::MemberSpecializationInfo::getTemplateSpecializationKind
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template specialization this is.
Definition: DeclTemplate.h:652
clang::ASTDeclWriter::VisitBindingDecl
void VisitBindingDecl(BindingDecl *D)
Definition: ASTWriterDecl.cpp:1162
clang::VarTemplateDecl
Declaration of a variable template.
Definition: DeclTemplate.h:3103
clang::serialization::DECL_PRAGMA_DETECT_MISMATCH
@ DECL_PRAGMA_DETECT_MISMATCH
A PragmaDetectMismatchDecl record.
Definition: ASTBitCodes.h:1509
clang::ImportDecl::getImportedModule
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Definition: Decl.h:4674
clang::RedeclarableTemplateDecl::isMemberSpecialization
bool isMemberSpecialization() const
Determines whether this template was a specialization of a member template.
Definition: DeclTemplate.h:909
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::IndirectFieldDecl::chain
ArrayRef< NamedDecl * > chain() const
Definition: Decl.h:3206
clang::PragmaDetectMismatchDecl::getValue
StringRef getValue() const
Definition: Decl.h:196
clang::FunctionDecl::getDescribedFunctionTemplate
FunctionTemplateDecl * getDescribedFunctionTemplate() const
Retrieves the function template that is described by this function declaration.
Definition: Decl.cpp:3802
SM
#define SM(sm)
Definition: Cuda.cpp:79
clang::ASTDeclWriter::VisitVarTemplateDecl
void VisitVarTemplateDecl(VarTemplateDecl *D)
Definition: ASTWriterDecl.cpp:1619
clang::ConstructorUsingShadowDecl
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3500
clang::ObjCInterfaceDecl::getTypeForDecl
const Type * getTypeForDecl() const
Definition: DeclObjC.h:1894
clang::serialization::DeclID
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
Definition: ASTBitCodes.h:68
clang::ASTContext::getInstantiatedFromUnnamedFieldDecl
FieldDecl * getInstantiatedFromUnnamedFieldDecl(FieldDecl *Field)
Definition: ASTContext.cpp:1620
clang::BlockDecl::param_size
size_t param_size() const
Definition: Decl.h:4413
clang::serialization::UPD_CXX_ADDED_ANONYMOUS_NAMESPACE
@ UPD_CXX_ADDED_ANONYMOUS_NAMESPACE
Definition: ASTCommon.h:27
clang::TemplateParamObjectDecl::getValue
const APValue & getValue() const
Definition: DeclTemplate.h:3386
clang::UsingPackDecl::expansions
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
Definition: DeclCXX.h:3729
clang::FriendTemplateDecl::getNumTemplateParameters
unsigned getNumTemplateParameters() const
Definition: DeclTemplate.h:2528
clang::ObjCContainerDecl::getAtEndRange
SourceRange getAtEndRange() const
Definition: DeclObjC.h:1098
clang::ASTDeclWriter::AddFirstDeclFromEachModule
void AddFirstDeclFromEachModule(const Decl *D, bool IncludeLocal)
Add to the record the first declaration from each module file that provides a declaration of D.
Definition: ASTWriterDecl.cpp:182
clang::ClassTemplateSpecializationDecl
Represents a class template specialization, which refers to a class template with a given set of temp...
Definition: DeclTemplate.h:1826
clang::ObjCPropertyDecl::getPropertyAttributes
ObjCPropertyAttribute::Kind getPropertyAttributes() const
Definition: DeclObjC.h:810
clang::ASTDeclWriter
Definition: ASTWriterDecl.cpp:34
clang::serialization::DECL_CONTEXT_VISIBLE
@ DECL_CONTEXT_VISIBLE
A record that stores the set of declarations that are visible from a given DeclContext.
Definition: ASTBitCodes.h:1347
clang::ASTContext::DeclMustBeEmitted
bool DeclMustBeEmitted(const Decl *D)
Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is onl...
Definition: ASTContext.cpp:11693
clang::FunctionDecl::parameters
ArrayRef< ParmVarDecl * > parameters() const
Definition: Decl.h:2571
clang::TemplateTemplateParmDecl::getDepth
unsigned getDepth() const
Get the nesting depth of the template parameter.
Definition: DeclTemplate.h:1180
clang::VarDecl::isExceptionVariable
bool isExceptionVariable() const
Determine whether this variable is the exception variable in a C++ catch statememt or an Objective-C ...
Definition: Decl.h:1434
clang::Decl::getLocation
SourceLocation getLocation() const
Definition: DeclBase.h:432
clang::serialization::DECL_OBJC_IVAR
@ DECL_OBJC_IVAR
A ObjCIvarDecl record.
Definition: ASTBitCodes.h:1268
clang::FriendDecl::getFriendTypeTemplateParameterList
TemplateParameterList * getFriendTypeTemplateParameterList(unsigned N) const
Definition: DeclFriend.h:130
addExplicitSpecifier
static void addExplicitSpecifier(ExplicitSpecifier ES, ASTRecordWriter &Record)
Definition: ASTWriterDecl.cpp:675
clang::Decl::isCanonicalDecl
bool isCanonicalDecl() const
Whether this particular Decl is a canonical one.
Definition: DeclBase.h:949
clang::NamespaceDecl
Represent a C++ namespace.
Definition: Decl.h:542
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1904
clang::ASTDeclWriter::VisitObjCContainerDecl
void VisitObjCContainerDecl(ObjCContainerDecl *D)
Definition: ASTWriterDecl.cpp:751
clang::ASTTemplateArgumentListInfo::RAngleLoc
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
Definition: TemplateBase.h:631
clang::BlockDecl::capturesCXXThis
bool capturesCXXThis() const
Definition: Decl.h:4443
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3983
clang::ASTContext::getInstantiatedFromUsingShadowDecl
UsingShadowDecl * getInstantiatedFromUsingShadowDecl(UsingShadowDecl *Inst)
Definition: ASTContext.cpp:1604
clang::ObjCList
ObjCList - This is a simple template class used to hold various lists of decls etc,...
Definition: DeclObjC.h:83
clang::ASTDeclWriter::VisitUsingDecl
void VisitUsingDecl(UsingDecl *D)
Definition: ASTWriterDecl.cpp:1295
clang::ObjCProtocolDecl::isThisDeclarationADefinition
bool isThisDeclarationADefinition() const
Determine whether this particular declaration is also the definition.
Definition: DeclObjC.h:2225
clang::FunctionDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:2668
clang::serialization::DECL_NON_TYPE_TEMPLATE_PARM
@ DECL_NON_TYPE_TEMPLATE_PARM
A NonTypeTemplateParmDecl record.
Definition: ASTBitCodes.h:1440
clang::NamespaceDecl::isInline
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition: Decl.h:607
clang::TypeConstraint
Definition: ASTConcept.h:169
clang::VarTemplateSpecializationDecl::getSpecializationKind
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
Definition: DeclTemplate.h:2790
clang::ASTDeclWriter::VisitUsingShadowDecl
void VisitUsingShadowDecl(UsingShadowDecl *D)
Definition: ASTWriterDecl.cpp:1325
clang::serialization::DECL_BINDING
@ DECL_BINDING
A BindingDecl record.
Definition: ASTBitCodes.h:1316
clang::ObjCCategoryDecl::protocol_size
unsigned protocol_size() const
Definition: DeclObjC.h:2378
clang::UsingDirectiveDecl::getNominatedNamespace
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition: DeclCXX.cpp:2879
clang::UnnamedGlobalConstantDecl
An artificial decl, representing a global anonymous constant value which is uniquified by value withi...
Definition: DeclCXX.h:4245
clang::DeclaratorDecl::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo() const
Definition: Decl.h:787
clang::ParmVarDecl::hasInheritedDefaultArg
bool hasInheritedDefaultArg() const
Definition: Decl.h:1845
clang::ObjCMethodDecl::isVariadic
bool isVariadic() const
Definition: DeclObjC.h:435
clang::NamespaceDecl::getAnonymousNamespace
NamespaceDecl * getAnonymousNamespace() const
Retrieve the anonymous namespace nested inside this namespace, if any.
Definition: Decl.h:662
clang::ASTDeclWriter::VisitCXXConstructorDecl
void VisitCXXConstructorDecl(CXXConstructorDecl *D)
Definition: ASTWriterDecl.cpp:1432
clang::BlockDecl::isConversionFromLambda
bool isConversionFromLambda() const
Definition: Decl.h:4454
clang::OMPDeclarativeDirective::Data
OMPChildren * Data
Data, associated with the directive.
Definition: DeclOpenMP.h:43
clang::VarTemplateSpecializationDecl::getTypeAsWritten
TypeSourceInfo * getTypeAsWritten() const
Gets the type of this specialization as it was written by the user, if it was so written.
Definition: DeclTemplate.h:2901
clang::serialization::DECL_CONTEXT_LEXICAL
@ DECL_CONTEXT_LEXICAL
A record that stores the set of declarations that are lexically stored within a given DeclContext.
Definition: ASTBitCodes.h:1338
clang::FriendDecl::getFriendType
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Definition: DeclFriend.h:122
clang::ObjCMethodDecl::param_size
unsigned param_size() const
Definition: DeclObjC.h:350
clang::Decl::getMostRecentDecl
Decl * getMostRecentDecl()
Retrieve the most recent declaration that declares the same entity as this declaration (which may be ...
Definition: DeclBase.h:1041
clang::Decl::getDeclKindName
const char * getDeclKindName() const
Definition: DeclBase.cpp:123
clang::FunctionTemplateSpecializationInfo::getMemberSpecializationInfo
MemberSpecializationInfo * getMemberSpecializationInfo() const
Get the specialization info if this function template specialization is also a member specialization:
Definition: DeclTemplate.h:608
clang::TemplateTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
Definition: DeclTemplate.h:1693
clang::BlockDecl::blockMissingReturnType
bool blockMissingReturnType() const
Definition: Decl.h:4446
clang::BlockDecl::getNumCaptures
unsigned getNumCaptures() const
Returns the number of captured variables.
Definition: Decl.h:4434
clang::CXXMethodDecl
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1983
clang::Decl::getDeclContext
DeclContext * getDeclContext()
Definition: DeclBase.h:441
clang::ObjCMethodDecl::getImplementationControl
ImplementationControl getImplementationControl() const
Definition: DeclObjC.h:504
clang::CXXDestructorDecl::getOperatorDeleteThisArg
Expr * getOperatorDeleteThisArg() const
Definition: DeclCXX.h:2740
clang::FunctionDecl::TK_DependentFunctionTemplateSpecialization
@ TK_DependentFunctionTemplateSpecialization
Definition: Decl.h:1925
clang::FunctionDecl::getDefaultLoc
SourceLocation getDefaultLoc() const
Definition: Decl.h:2282