Go to the documentation of this file.
24 #include "llvm/Bitstream/BitstreamWriter.h"
25 #include "llvm/Support/ErrorHandling.h"
26 using namespace clang;
27 using namespace serialization;
45 : Writer(Writer), Context(Context), Record(Writer, Record),
46 Code((serialization::
DeclCode)0), AbbrevToUse(0) {}
50 llvm::report_fatal_error(StringRef(
"unexpected declaration kind '") +
52 return Record.
Emit(Code, AbbrevToUse);
57 void VisitDecl(
Decl *D);
76 void VisitClassTemplateSpecializationDecl(
78 void VisitClassTemplatePartialSpecializationDecl(
81 void VisitVarTemplatePartialSpecializationDecl(
83 void VisitClassScopeFunctionSpecializationDecl(
170 for (
auto typeParam : *typeParams) {
181 llvm::MapVector<ModuleFile*, const Decl*> Firsts;
184 if (R->isFromASTFile())
186 else if (IncludeLocal)
189 for (
const auto &F : Firsts)
194 template <
typename EntryType>
203 return Common->PartialSpecializations;
209 template<
typename DeclTy>
211 auto *Common = D->getCommonPtr();
217 Common->LazySpecializations) {
218 D->LoadLazySpecializations();
219 assert(!Common->LazySpecializations);
223 if (
auto *LS = Common->LazySpecializations)
224 LazySpecializations = llvm::makeArrayRef(LS + 1, LS[0]);
227 unsigned I = Record.
size();
233 for (
auto &Entry : Common->Specializations)
234 Specs.push_back(getSpecializationDecl(Entry));
235 for (
auto &Entry : getPartialSpecializations(Common))
236 Specs.push_back(getSpecializationDecl(Entry));
238 for (
auto *D : Specs) {
239 assert(D->isCanonicalDecl() &&
"non-canonical decl in set");
240 AddFirstDeclFromEachModule(D,
true);
242 Record.
append(LazySpecializations.begin(), LazySpecializations.end());
245 Record[I] = Record.
size() - I - 1;
251 const Decl *Specialization) {
266 Writer.DeclUpdates[Template].push_back(ASTWriter::DeclUpdate(
279 if (
auto *TInfo = DD->getTypeSourceInfo())
280 Record.AddTypeLoc(TInfo->getTypeLoc());
287 Record.push_back(FD->doesThisDeclarationHaveABody());
288 if (FD->doesThisDeclarationHaveABody())
289 Record.AddFunctionDefinition(FD);
296 VisitDeclContext(DC);
308 Record.AddAttributes(D->
getAttrs());
310 Record.push_back(D->
isUsed(
false));
327 while (
auto *NS = dyn_cast<NamespaceDecl>(DC->getRedeclContext())) {
328 if (!NS->isFromASTFile())
330 Writer.UpdatedDeclContexts.insert(NS->getPrimaryContext());
331 if (!NS->isInlineNamespace())
339 StringRef Arg = D->
getArg();
340 Record.push_back(Arg.size());
344 Record.AddString(Arg);
352 Record.push_back(Name.size() + 1 +
Value.size());
355 Record.AddString(Name);
356 Record.AddString(
Value);
361 llvm_unreachable(
"Translation units aren't directly serialized");
368 ? Writer.getAnonymousDeclarationNumber(D)
379 VisitRedeclarable(D);
382 Record.push_back(D->
isModed());
389 VisitTypedefNameDecl(D);
399 AbbrevToUse = Writer.getDeclTypedefAbbrev();
405 VisitTypedefNameDecl(D);
411 VisitRedeclarable(D);
415 if (!isa<CXXRecordDecl>(D))
422 if (D->hasExtInfo()) {
424 Record.AddQualifierInfo(*D->getExtInfo());
427 Record.AddDeclRef(TD);
428 Record.AddIdentifierRef(TD->getDeclName().getAsIdentifierInfo());
444 Record.push_back(D->
isFixed());
448 Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
449 Record.push_back(MemberInfo->getTemplateSpecializationKind());
450 Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
452 Record.AddDeclRef(
nullptr);
472 AbbrevToUse = Writer.getDeclEnumAbbrev();
507 AbbrevToUse = Writer.getDeclRecordAbbrev();
514 Record.AddTypeRef(D->
getType());
530 Record.push_back(D->hasExtInfo());
531 if (D->hasExtInfo()) {
532 DeclaratorDecl::ExtInfo *Info = D->getExtInfo();
533 Record.AddQualifierInfo(*Info);
534 Record.AddStmt(Info->TrailingRequiresClause);
542 VisitRedeclarable(D);
543 VisitDeclaratorDecl(D);
544 Record.AddDeclarationNameLoc(D->DNLoc, D->
getDeclName());
553 Record.push_back(D->
isPure());
556 Record.push_back(D->isDeletedBit());
568 Record.AddSourceLocation(D->
getEndLoc());
574 Record.push_back(FDI->getUnqualifiedLookups().size());
576 Record.AddDeclRef(
P.getDecl());
577 Record.push_back(
P.getAccess());
602 RegisterTemplateSpecialization(FTSInfo->
getTemplate(), D);
616 Record.AddTemplateArgumentLoc(
627 Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
628 Record.push_back(MemberInfo->getTemplateSpecializationKind());
629 Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
662 Record.AddDeclRef(
P);
669 Kind = Kind << 1 | static_cast<bool>(ES.
getExpr());
678 Record.AddDeclRef(D->Ctor);
679 VisitFunctionDecl(D);
688 bool HasBodyStuff = D->
getBody() !=
nullptr;
689 Record.push_back(HasBodyStuff);
717 Record.AddSourceLocation(D->
getEndLoc());
720 Record.AddDeclRef(
P);
722 Record.push_back(D->getSelLocsKind());
723 unsigned NumStoredSelLocs = D->getNumStoredSelLocs();
725 Record.push_back(NumStoredSelLocs);
726 for (
unsigned i = 0; i != NumStoredSelLocs; ++i)
727 Record.AddSourceLocation(SelLocs[i]);
733 VisitTypedefNameDecl(D);
734 Record.push_back(D->Variance);
735 Record.push_back(D->Index);
736 Record.AddSourceLocation(D->VarianceLoc);
737 Record.AddSourceLocation(D->ColonLoc);
750 VisitRedeclarable(D);
751 VisitObjCContainerDecl(D);
753 AddObjCTypeParamList(D->TypeParamList);
758 ObjCInterfaceDecl::DefinitionData &Data = D->data();
762 Record.push_back(Data.HasDesignatedInitializers);
765 Record.push_back(Data.ReferencedProtocols.size());
767 Record.AddDeclRef(
P);
769 Record.AddSourceLocation(PL);
772 Record.push_back(Data.AllReferencedProtocols.size());
774 P = Data.AllReferencedProtocols.begin(),
775 PEnd = Data.AllReferencedProtocols.end();
777 Record.AddDeclRef(*
P);
782 Writer.ObjCClassesWithCategories.insert(D);
785 for (; Cat; Cat = Cat->getNextClassCategoryRaw())
786 (void)Writer.GetDeclRef(Cat);
809 AbbrevToUse = Writer.getDeclObjCIvarAbbrev();
815 VisitRedeclarable(D);
816 VisitObjCContainerDecl(D);
822 Record.AddDeclRef(I);
824 Record.AddSourceLocation(PL);
836 VisitObjCContainerDecl(D);
841 AddObjCTypeParamList(D->TypeParamList);
844 Record.AddDeclRef(I);
846 Record.AddSourceLocation(PL);
858 Record.AddSourceLocation(D->
getAtLoc());
860 Record.AddTypeRef(D->
getType());
878 VisitObjCContainerDecl(D);
884 VisitObjCImplDecl(D);
890 VisitObjCImplDecl(D);
897 Record.push_back(D->NumIvarInitializers);
898 if (D->NumIvarInitializers)
899 Record.AddCXXCtorInitializers(
918 VisitDeclaratorDecl(D);
921 FieldDecl::InitStorageKind ISK = D->InitStorage.getInt();
922 Record.push_back(ISK);
923 if (ISK == FieldDecl::ISK_CapturedVLAType)
948 AbbrevToUse = Writer.getDeclFieldAbbrev();
954 VisitDeclaratorDecl(D);
963 Record.push_back(Parts.
Part1);
964 Record.push_back(Parts.
Part2);
965 Record.push_back(Parts.
Part3);
987 for (
const auto *
P : D->
chain())
988 Record.AddDeclRef(
P);
993 VisitRedeclarable(D);
994 VisitDeclaratorDecl(D);
999 if (!isa<ParmVarDecl>(D)) {
1010 if (
const auto *IPD = dyn_cast<ImplicitParamDecl>(D))
1011 Record.push_back(
static_cast<unsigned>(IPD->getParameterKind()));
1013 Record.push_back(0);
1018 Record.AddVarDeclInit(D);
1022 Record.AddStmt(Init.getCopyExpr());
1023 if (Init.getCopyExpr())
1024 Record.push_back(Init.canThrow());
1028 bool ModulesCodegen =
false;
1029 if (Writer.WritingModule &&
1031 !isa<VarTemplateSpecializationDecl>(D)) {
1037 (Writer.WritingModule->isInterfaceOrPartition() ||
1038 (D->
hasAttr<DLLExportAttr>() &&
1039 Writer.Context->getLangOpts().BuildingPCHWithObjectFile)) &&
1042 Record.push_back(ModulesCodegen);
1044 Writer.ModularCodegenDecls.push_back(Writer.GetDeclRef(D));
1048 VarNotTemplate = 0, VarTemplate, StaticDataMemberSpecialization
1051 Record.push_back(VarTemplate);
1052 Record.AddDeclRef(TemplD);
1055 Record.push_back(StaticDataMemberSpecialization);
1056 Record.AddDeclRef(SpecInfo->getInstantiatedFrom());
1057 Record.push_back(SpecInfo->getTemplateSpecializationKind());
1058 Record.AddSourceLocation(SpecInfo->getPointOfInstantiation());
1060 Record.push_back(VarNotTemplate);
1085 AbbrevToUse = Writer.getDeclVarAbbrev();
1128 AbbrevToUse = Writer.getDeclParmVarAbbrev();
1132 assert(!D->
getTSCSpec() &&
"PARM_VAR_DECL can't use TLS");
1134 &&
"PARM_VAR_DECL can't be demoted definition.");
1135 assert(D->
getAccess() ==
AS_none &&
"PARM_VAR_DECL can't be public/private");
1137 assert(D->
getPreviousDecl() ==
nullptr &&
"PARM_VAR_DECL can't be redecl");
1139 "PARM_VAR_DECL can't be static data member");
1144 Record.push_back(D->
bindings().size());
1148 Record.AddDeclRef(B);
1175 Record.push_back(
static_cast<bool>(D->
getValue()));
1187 Record.AddDeclRef(
P);
1195 for (
const auto &capture : D->
captures()) {
1196 Record.AddDeclRef(capture.getVariable());
1199 if (capture.isByRef()) flags |= 1;
1200 if (capture.isNested()) flags |= 2;
1201 if (capture.hasCopyExpr()) flags |= 4;
1202 Record.push_back(flags);
1204 if (capture.hasCopyExpr()) Record.AddStmt(capture.getCopyExpr());
1214 Record.push_back(CD->
isNothrow() ? 1 : 0);
1217 Record.AddDeclRef(CD->
getParam(I));
1243 VisitRedeclarable(D);
1261 if (
Parent->isFromASTFile() || isa<TranslationUnitDecl>(
Parent)) {
1262 Writer.DeclUpdates[
Parent].push_back(
1269 VisitRedeclarable(D);
1282 Record.AddDeclarationNameLoc(D->DNLoc, D->
getDeclName());
1283 Record.AddDeclRef(D->FirstUsingShadow.getPointer());
1294 Record.AddDeclRef(D->FirstUsingShadow.getPointer());
1300 Record.push_back(D->NumExpansions);
1304 Record.AddDeclRef(E);
1309 VisitRedeclarable(D);
1313 Record.AddDeclRef(D->UsingOrNextShadow);
1320 VisitUsingShadowDecl(D);
1321 Record.AddDeclRef(D->NominatedBaseClassShadowDecl);
1322 Record.AddDeclRef(D->ConstructedBaseClassShadowDecl);
1323 Record.push_back(D->IsVirtual);
1341 Record.AddDeclarationNameLoc(D->DNLoc, D->
getDeclName());
1365 CXXRecNotTemplate = 0, CXXRecTemplate, CXXRecMemberSpecialization
1368 Record.push_back(CXXRecTemplate);
1369 Record.AddDeclRef(TemplD);
1372 Record.push_back(CXXRecMemberSpecialization);
1373 Record.AddDeclRef(MSInfo->getInstantiatedFrom());
1374 Record.push_back(MSInfo->getTemplateSpecializationKind());
1375 Record.AddSourceLocation(MSInfo->getPointOfInstantiation());
1377 Record.push_back(CXXRecNotTemplate);
1382 Record.AddCXXDefinitionData(D);
1393 VisitFunctionDecl(D);
1397 Record.AddDeclRef(MD);
1400 Record.push_back(0);
1412 AbbrevToUse = Writer.getDeclCXXMethodAbbrev();
1418 Record.push_back(D->getTrailingAllocKind());
1421 Record.AddDeclRef(Inherited.getShadowDecl());
1422 Record.AddDeclRef(Inherited.getConstructor());
1425 VisitCXXMethodDecl(D);
1430 VisitCXXMethodDecl(D);
1441 VisitCXXMethodDecl(D);
1449 Record.push_back(!IdentifierLocs.empty());
1450 if (IdentifierLocs.empty()) {
1451 Record.AddSourceLocation(D->
getEndLoc());
1452 Record.push_back(1);
1454 for (
unsigned I = 0, N = IdentifierLocs.size(); I != N; ++I)
1455 Record.AddSourceLocation(IdentifierLocs[I]);
1456 Record.push_back(IdentifierLocs.size());
1472 Record.push_back(D->NumTPLists);
1474 bool hasFriendDecl = D->Friend.is<
NamedDecl*>();
1475 Record.push_back(hasFriendDecl);
1480 for (
unsigned i = 0; i < D->NumTPLists; ++i)
1482 Record.AddDeclRef(D->getNextFriend());
1483 Record.push_back(D->UnsupportedFriend);
1484 Record.AddSourceLocation(D->FriendLoc);
1510 VisitTemplateDecl(D);
1520 VisitRedeclarable(D);
1531 VisitTemplateDecl(D);
1536 VisitRedeclarableTemplateDecl(D);
1539 AddTemplateSpecializations(D);
1547 VisitCXXRecordDecl(D);
1553 Record.AddDeclRef(InstFromD);
1584 VisitClassTemplateSpecializationDecl(D);
1596 VisitRedeclarableTemplateDecl(D);
1599 AddTemplateSpecializations(D);
1609 llvm::PointerUnion<VarTemplateDecl *, VarTemplatePartialSpecializationDecl *>
1612 Record.AddDeclRef(InstFromD);
1628 Record.push_back(D->IsCompleteDefinition);
1644 VisitVarTemplateSpecializationDecl(D);
1667 VisitRedeclarableTemplateDecl(D);
1670 AddTemplateSpecializations(D);
1681 Record.push_back(TC !=
nullptr);
1697 Record.push_back(OwnsDefaultArg);
1713 VisitDeclaratorDecl(D);
1732 Record.push_back(OwnsDefaultArg);
1746 VisitTemplateDecl(D);
1761 Record.push_back(OwnsDefaultArg);
1769 VisitRedeclarableTemplateDecl(D);
1784 Record.AddOffset(Writer.WriteDeclContextLexicalBlock(Context, DC));
1785 Record.AddOffset(Writer.WriteDeclContextVisibleBlock(Context, DC));
1789 assert(IsLocalDecl(D) &&
"expected a local declaration");
1792 if (IsLocalDecl(Canon))
1795 const Decl *&CacheEntry = FirstLocalDeclCache[Canon];
1800 if (IsLocalDecl(Redecl))
1802 return CacheEntry = D;
1805 template <
typename T>
1808 T *MostRecent =
First->getMostRecentDecl();
1809 T *DAsT =
static_cast<T *
>(D);
1810 if (MostRecent !=
First) {
1812 "Not considered redeclarable?");
1814 Record.AddDeclRef(
First);
1818 const Decl *FirstLocal = Writer.getFirstLocalDecl(DAsT);
1819 if (DAsT == FirstLocal) {
1823 unsigned I = Record.size();
1824 Record.push_back(0);
1826 AddFirstDeclFromEachModule(DAsT,
false);
1828 Record[I] = Record.size() - I;
1836 if (!Prev->isFromASTFile())
1841 if (LocalRedecls.empty())
1842 Record.push_back(0);
1846 Record.push_back(0);
1847 Record.AddDeclRef(FirstLocal);
1857 (void)Writer.GetDeclRef(MostRecent);
1860 Record.push_back(0);
1865 Record.writeOMPChildren(D->
Data);
1871 Record.writeOMPChildren(D->
Data);
1877 Record.writeOMPChildren(D->
Data);
1897 Record.writeOMPChildren(D->
Data);
1913 void ASTWriter::WriteDeclAbbrevs() {
1914 using namespace llvm;
1916 std::shared_ptr<BitCodeAbbrev> Abv;
1919 Abv = std::make_shared<BitCodeAbbrev>();
1922 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1923 Abv->Add(BitCodeAbbrevOp(0));
1924 Abv->Add(BitCodeAbbrevOp(0));
1925 Abv->Add(BitCodeAbbrevOp(0));
1926 Abv->Add(BitCodeAbbrevOp(0));
1927 Abv->Add(BitCodeAbbrevOp(0));
1928 Abv->Add(BitCodeAbbrevOp(0));
1929 Abv->Add(BitCodeAbbrevOp(0));
1930 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
1931 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
1932 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1934 Abv->Add(BitCodeAbbrevOp(0));
1935 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1936 Abv->Add(BitCodeAbbrevOp(0));
1938 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1940 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1941 Abv->Add(BitCodeAbbrevOp(0));
1942 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1944 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
1945 Abv->Add(BitCodeAbbrevOp(0));
1947 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
1948 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1949 DeclFieldAbbrev = Stream.EmitAbbrev(std::move(Abv));
1952 Abv = std::make_shared<BitCodeAbbrev>();
1955 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1956 Abv->Add(BitCodeAbbrevOp(0));
1957 Abv->Add(BitCodeAbbrevOp(0));
1958 Abv->Add(BitCodeAbbrevOp(0));
1959 Abv->Add(BitCodeAbbrevOp(0));
1960 Abv->Add(BitCodeAbbrevOp(0));
1961 Abv->Add(BitCodeAbbrevOp(0));
1962 Abv->Add(BitCodeAbbrevOp(0));
1963 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
1964 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
1965 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1967 Abv->Add(BitCodeAbbrevOp(0));
1968 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1969 Abv->Add(BitCodeAbbrevOp(0));
1971 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1973 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1974 Abv->Add(BitCodeAbbrevOp(0));
1975 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1977 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
1978 Abv->Add(BitCodeAbbrevOp(0));
1980 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1981 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1983 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
1984 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1985 DeclObjCIvarAbbrev = Stream.EmitAbbrev(std::move(Abv));
1988 Abv = std::make_shared<BitCodeAbbrev>();
1991 Abv->Add(BitCodeAbbrevOp(0));
1993 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
1994 Abv->Add(BitCodeAbbrevOp(0));
1995 Abv->Add(BitCodeAbbrevOp(0));
1996 Abv->Add(BitCodeAbbrevOp(0));
1997 Abv->Add(BitCodeAbbrevOp(0));
1998 Abv->Add(BitCodeAbbrevOp(0));
1999 Abv->Add(BitCodeAbbrevOp(0));
2000 Abv->Add(BitCodeAbbrevOp(0));
2001 Abv->Add(BitCodeAbbrevOp(
AS_none));
2002 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2003 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2005 Abv->Add(BitCodeAbbrevOp(0));
2006 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2007 Abv->Add(BitCodeAbbrevOp(0));
2009 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2010 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2012 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2013 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2014 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2015 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2016 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2017 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2018 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2019 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2020 Abv->Add(BitCodeAbbrevOp(0));
2022 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2023 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2024 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2025 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2026 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2027 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2028 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2029 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2030 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
2031 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2033 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2034 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2035 DeclEnumAbbrev = Stream.EmitAbbrev(std::move(Abv));
2038 Abv = std::make_shared<BitCodeAbbrev>();
2041 Abv->Add(BitCodeAbbrevOp(0));
2043 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2044 Abv->Add(BitCodeAbbrevOp(0));
2045 Abv->Add(BitCodeAbbrevOp(0));
2046 Abv->Add(BitCodeAbbrevOp(0));
2047 Abv->Add(BitCodeAbbrevOp(0));
2048 Abv->Add(BitCodeAbbrevOp(0));
2049 Abv->Add(BitCodeAbbrevOp(0));
2050 Abv->Add(BitCodeAbbrevOp(0));
2051 Abv->Add(BitCodeAbbrevOp(
AS_none));
2052 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2053 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2055 Abv->Add(BitCodeAbbrevOp(0));
2056 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2057 Abv->Add(BitCodeAbbrevOp(0));
2059 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2060 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2062 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2063 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2064 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2065 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2066 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2067 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2068 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2069 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2070 Abv->Add(BitCodeAbbrevOp(0));
2072 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2073 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2074 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2075 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2078 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2080 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2082 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2084 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2086 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2088 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2090 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2092 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2095 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2096 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2097 DeclRecordAbbrev = Stream.EmitAbbrev(std::move(Abv));
2100 Abv = std::make_shared<BitCodeAbbrev>();
2103 Abv->Add(BitCodeAbbrevOp(0));
2105 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2106 Abv->Add(BitCodeAbbrevOp(0));
2107 Abv->Add(BitCodeAbbrevOp(0));
2108 Abv->Add(BitCodeAbbrevOp(0));
2109 Abv->Add(BitCodeAbbrevOp(0));
2110 Abv->Add(BitCodeAbbrevOp(0));
2111 Abv->Add(BitCodeAbbrevOp(0));
2112 Abv->Add(BitCodeAbbrevOp(0));
2113 Abv->Add(BitCodeAbbrevOp(
AS_none));
2114 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2115 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2117 Abv->Add(BitCodeAbbrevOp(0));
2118 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2119 Abv->Add(BitCodeAbbrevOp(0));
2121 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2123 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2124 Abv->Add(BitCodeAbbrevOp(0));
2125 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2127 Abv->Add(BitCodeAbbrevOp(0));
2128 Abv->Add(BitCodeAbbrevOp(0));
2129 Abv->Add(BitCodeAbbrevOp(0));
2130 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2131 Abv->Add(BitCodeAbbrevOp(0));
2132 Abv->Add(BitCodeAbbrevOp(0));
2133 Abv->Add(BitCodeAbbrevOp(0));
2135 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2136 Abv->Add(BitCodeAbbrevOp(0));
2137 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2138 Abv->Add(BitCodeAbbrevOp(0));
2139 Abv->Add(BitCodeAbbrevOp(0));
2140 Abv->Add(BitCodeAbbrevOp(0));
2141 Abv->Add(BitCodeAbbrevOp(0));
2143 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2144 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2145 DeclParmVarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2148 Abv = std::make_shared<BitCodeAbbrev>();
2151 Abv->Add(BitCodeAbbrevOp(0));
2153 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2154 Abv->Add(BitCodeAbbrevOp(0));
2155 Abv->Add(BitCodeAbbrevOp(0));
2156 Abv->Add(BitCodeAbbrevOp(0));
2157 Abv->Add(BitCodeAbbrevOp(0));
2158 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2159 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2160 Abv->Add(BitCodeAbbrevOp(0));
2161 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2162 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2163 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2165 Abv->Add(BitCodeAbbrevOp(0));
2166 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2167 Abv->Add(BitCodeAbbrevOp(0));
2169 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2170 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2172 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2173 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2174 DeclTypedefAbbrev = Stream.EmitAbbrev(std::move(Abv));
2177 Abv = std::make_shared<BitCodeAbbrev>();
2180 Abv->Add(BitCodeAbbrevOp(0));
2182 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2183 Abv->Add(BitCodeAbbrevOp(0));
2184 Abv->Add(BitCodeAbbrevOp(0));
2185 Abv->Add(BitCodeAbbrevOp(0));
2186 Abv->Add(BitCodeAbbrevOp(0));
2187 Abv->Add(BitCodeAbbrevOp(0));
2188 Abv->Add(BitCodeAbbrevOp(0));
2189 Abv->Add(BitCodeAbbrevOp(0));
2190 Abv->Add(BitCodeAbbrevOp(
AS_none));
2191 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2192 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2194 Abv->Add(BitCodeAbbrevOp(0));
2195 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2196 Abv->Add(BitCodeAbbrevOp(0));
2198 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2200 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2201 Abv->Add(BitCodeAbbrevOp(0));
2202 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2204 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2205 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2206 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2207 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2208 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2209 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2210 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2211 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2212 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2213 Abv->Add(BitCodeAbbrevOp(0));
2214 Abv->Add(BitCodeAbbrevOp(0));
2215 Abv->Add(BitCodeAbbrevOp(0));
2216 Abv->Add(BitCodeAbbrevOp(0));
2217 Abv->Add(BitCodeAbbrevOp(0));
2218 Abv->Add(BitCodeAbbrevOp(0));
2219 Abv->Add(BitCodeAbbrevOp(0));
2220 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2221 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2222 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2224 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2225 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2226 DeclVarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2229 Abv = std::make_shared<BitCodeAbbrev>();
2232 Abv->Add(BitCodeAbbrevOp(0));
2234 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2235 Abv->Add(BitCodeAbbrevOp(0));
2236 Abv->Add(BitCodeAbbrevOp(0));
2237 Abv->Add(BitCodeAbbrevOp(0));
2238 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2239 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2240 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2241 Abv->Add(BitCodeAbbrevOp(0));
2242 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2243 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2244 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2247 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2248 Abv->Add(BitCodeAbbrevOp(0));
2250 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2252 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2253 Abv->Add(BitCodeAbbrevOp(0));
2254 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2256 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 11));
2257 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2258 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2259 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2260 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2261 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2262 Abv->Add(BitCodeAbbrevOp(0));
2263 Abv->Add(BitCodeAbbrevOp(1));
2264 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2265 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2266 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2267 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2268 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2269 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2270 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2));
2271 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2272 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2273 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2274 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2275 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2276 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2277 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
2278 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2287 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2288 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2289 DeclCXXMethodAbbrev = Stream.EmitAbbrev(std::move(Abv));
2291 unsigned ExprDependenceBits = llvm::BitWidth<ExprDependence>;
2293 Abv = std::make_shared<BitCodeAbbrev>();
2297 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2298 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2299 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2300 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2302 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2303 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2304 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2305 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2306 Abv->Add(BitCodeAbbrevOp(0));
2307 Abv->Add(BitCodeAbbrevOp(0));
2308 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2309 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2310 DeclRefExprAbbrev = Stream.EmitAbbrev(std::move(Abv));
2313 Abv = std::make_shared<BitCodeAbbrev>();
2317 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2318 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2319 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2320 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2322 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2323 Abv->Add(BitCodeAbbrevOp(32));
2324 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2325 IntegerLiteralAbbrev = Stream.EmitAbbrev(std::move(Abv));
2328 Abv = std::make_shared<BitCodeAbbrev>();
2332 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2333 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2334 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2335 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2337 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2338 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2339 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2340 CharacterLiteralAbbrev = Stream.EmitAbbrev(std::move(Abv));
2343 Abv = std::make_shared<BitCodeAbbrev>();
2347 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2348 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, ExprDependenceBits));
2349 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2350 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2352 Abv->Add(BitCodeAbbrevOp(0));
2353 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2354 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 6));
2355 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2357 ExprImplicitCastAbbrev = Stream.EmitAbbrev(std::move(Abv));
2359 Abv = std::make_shared<BitCodeAbbrev>();
2361 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
2362 DeclContextLexicalAbbrev = Stream.EmitAbbrev(std::move(Abv));
2364 Abv = std::make_shared<BitCodeAbbrev>();
2366 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
2367 DeclContextVisibleLookupAbbrev = Stream.EmitAbbrev(std::move(Abv));
2383 bool WritingModule) {
2389 if (isa<FileScopeAsmDecl>(D) || isa<ObjCImplDecl>(D))
2407 assert(!D->
isFromASTFile() &&
"should not be emitting imported decl");
2414 assert(
ID >= FirstDeclID &&
"invalid decl ID");
2427 unsigned Index =
ID - FirstDeclID;
2428 if (DeclOffsets.size() == Index)
2429 DeclOffsets.emplace_back(Loc,
Offset, DeclTypesBlockStartOffset);
2430 else if (DeclOffsets.size() < Index) {
2432 DeclOffsets.resize(Index+1);
2433 DeclOffsets[Index].setLocation(Loc);
2434 DeclOffsets[Index].setBitOffset(
Offset, DeclTypesBlockStartOffset);
2436 llvm_unreachable(
"declarations should be emitted in ID order");
2440 if (Loc.
isValid() &&
SM.isLocalSourceLocation(Loc))
2441 associateDeclWithFile(D,
ID);
2446 EagerlyDeserializedDecls.push_back(
ID);
2451 Writer->ClearSwitchCaseIDs();
2454 bool ModulesCodegen =
false;
2457 if (Writer->WritingModule &&
2458 Writer->WritingModule->isInterfaceOrPartition()) {
2463 Linkage = Writer->Context->GetGVALinkageForFunction(FD);
2466 if (Writer->Context->getLangOpts().ModulesCodegen ||
2467 (FD->
hasAttr<DLLExportAttr>() &&
2468 Writer->Context->getLangOpts().BuildingPCHWithObjectFile)) {
2472 if (!FD->
hasAttr<AlwaysInlineAttr>()) {
2474 Linkage = Writer->Context->GetGVALinkageForFunction(FD);
2480 Record->push_back(ModulesCodegen);
2482 Writer->ModularCodegenDecls.push_back(Writer->GetDeclRef(FD));
2483 if (
auto *CD = dyn_cast<CXXConstructorDecl>(FD)) {
2484 Record->push_back(CD->getNumCtorInitializers());
2485 if (CD->getNumCtorInitializers())
2486 AddCXXCtorInitializers(
2487 llvm::makeArrayRef(CD->init_begin(), CD->init_end()));
@ DECL_CXX_METHOD
A CXXMethodDecl record.
SourceLocation getInnerLocStart() const
Return start of source range ignoring outer template declarations.
Store information needed for an explicit specifier.
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
@ DECL_NAMESPACE
A NamespaceDecl record.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
NamedDecl * getTemplatedDecl() const
Get the underlying, templated declaration.
Represents an ObjC class declaration.
bool hasFlexibleArrayMember() const
ExplicitSpecifier getExplicitSpecifier()
This represents '#pragma omp allocate ...' directive.
Represents an empty-declaration.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
void VisitObjCCategoryDecl(ObjCCategoryDecl *D)
Expr * getConstraintExpr() const
@ DECL_OMP_DECLARE_MAPPER
An OMPDeclareMapperDecl record.
Expr * getInitializer()
Get initializer expression (if specified) of the declare reduction construct.
void VisitFileScopeAsmDecl(FileScopeAsmDecl *D)
ObjCIvarDecl * getPropertyIvarDecl() const
bool doesThisDeclarationHaveABody() const
Returns whether this specific declaration of the function has a body.
ObjCCompatibleAliasDecl - Represents alias of a class.
void VisitDeclContext(DeclContext *DC)
Emit the DeclContext part of a declaration context decl.
void AddFunctionDefinition(const FunctionDecl *FD)
Add a definition for the given function to the queue of statements to emit.
DefaultedFunctionInfo * getDefaultedFunctionInfo() const
@ DECL_CAPTURED
A CapturedDecl record.
Represents an access specifier followed by colon ':'.
bool isDefaulted() const
Whether this function is defaulted.
ArrayRef< ParmVarDecl * > parameters() const
void VisitClassTemplatePartialSpecializationDecl(ClassTemplatePartialSpecializationDecl *D)
@ DECL_USING
A UsingDecl record.
@ DECL_PARM_VAR
A ParmVarDecl record.
@ DECL_USING_SHADOW
A UsingShadowDecl record.
bool hasRedeclaration() const
True if redeclared in the same interface.
YAML serialization mapping.
bool hasWrittenPrototype() const
Whether this function has a written prototype.
Represents a C++ constructor within a class.
StorageDuration getStorageDuration() const
Get the storage duration of this variable, per C++ [basic.stc].
bool hasVolatileMember() const
SourceLocation getRBraceLoc() const
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getFriendLoc() const
Retrieves the location of the 'friend' keyword.
void VisitPragmaCommentDecl(PragmaCommentDecl *D)
protocol_range protocols() const
Declaration of a friend template.
void VisitUsingEnumDecl(UsingEnumDecl *D)
Parts of a decomposed MSGuidDecl.
QualType getType() const
Return the type wrapped by this type source info.
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
bool hasNonTrivialToPrimitiveCopyCUnion() const
SourceLocation getRBraceLoc() const
Provides information about a dependent function-template specialization declaration.
@ DECL_UNRESOLVED_USING_IF_EXISTS
An UnresolvedUsingIfExistsDecl record.
SourceLocation getBeginLoc() const LLVM_READONLY
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
bool isInlineSpecified() const
Provides information a specialization of a member of a class template, which may be a member function...
void VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D)
@ DECL_EMPTY
An EmptyDecl record.
SourceLocation getEndLoc() const LLVM_READONLY
@ DECL_FRIEND_TEMPLATE
A FriendTemplateDecl record.
init_iterator init_end()
init_end() - Retrieve an iterator past the last initializer.
@ TK_MemberSpecialization
ArgPassingKind getArgPassingRestrictions() const
Represents a linkage specification.
ArrayRef< BindingDecl * > bindings() const
@ DECL_TYPE_ALIAS_TEMPLATE
A TypeAliasTemplateDecl record.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
@ DECL_DECOMPOSITION
A DecompositionDecl record.
Represents a C++ conversion function within a class.
Provides common interface for the Decls that can be redeclared.
Expr * getSetterCXXAssignment() const
ObjCMethodDecl * getGetterMethodDecl() const
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this class is an instantiation of a member class of a class template specialization,...
Represents a C++ namespace alias.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
void VisitTagDecl(TagDecl *D)
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
@ DECL_USING_PACK
A UsingPackDecl record.
const TemplateArgumentList * TemplateArguments
The template arguments used to produce the function template specialization from the function templat...
@ DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION
A ClassScopeFunctionSpecializationDecl record a class scope function specialization.
IdentifierInfo * getGetterId() const
virtual bool isOutOfLine() const
Determine whether this declaration is declared out of line (outside its semantic context).
void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D)
void VisitMSPropertyDecl(MSPropertyDecl *D)
Represents C++ using-directive.
init_iterator init_begin()
init_begin() - Retrieve an iterator to the first initializer.
A binding in a decomposition declaration.
@ DECL_OMP_THREADPRIVATE
An OMPThreadPrivateDecl record.
Encodes a location in the source.
This represents '#pragma omp threadprivate ...' directive.
@ DECL_PRAGMA_COMMENT
A PragmaCommentDecl record.
void VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D)
const TemplateArgumentList & getTemplateInstantiationArgs() const
Retrieve the set of template arguments that should be used to instantiate the initializer of the vari...
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
This represents a decl that may have a name.
DeclContext * getPrimaryContext()
getPrimaryContext - There may be many different declarations of the same entity (including forward de...
void VisitCapturedDecl(CapturedDecl *D)
Expr * getInitPriv()
Get Priv variable of the initializer.
SourceLocation getPointOfInstantiation() const
Get the point of instantiation (if any), or null if none.
TypeSourceInfo * getIntegerTypeSourceInfo() const
Return the type source info for the underlying integer type, if no type source info exists,...
ClassTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
void push_back(uint64_t N)
Minimal vector-like interface.
SourceLocation getExternLoc() const
Gets the location of the extern keyword, if present.
const Decl * getFirstLocalDecl(const Decl *D)
Find the first local declaration of a given local redeclarable decl.
ConceptDecl * getNamedConcept() const
A (possibly-)qualified type.
const Type * getTypeForDecl() const
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
SourceLocation getRParenLoc() const
TypeSourceInfo * getTypeSourceInfo() const
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
void VisitNamespaceDecl(NamespaceDecl *D)
bool hasExplicitTemplateArgs() const
unsigned getNumParams() const
AccessControl getAccessControl() const
@ DECL_USING_ENUM
A UsingEnumDecl record.
Declaration of a function specialization at template class scope.
Represents a member of a struct/union/class.
void VisitVarDecl(VarDecl *D)
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
Represents a parameter to a function.
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
ObjCMethodDecl * getGetterMethodDecl() const
ObjCInterfaceDecl * getClassInterface()
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
@ DECL_CONSTRUCTOR_USING_SHADOW
A ConstructorUsingShadowDecl record.
const TemplateArgumentLoc & getTemplateArg(unsigned I) const
Returns the nth template argument.
void AddObjCTypeParamList(ObjCTypeParamList *typeParams)
Add an Objective-C type parameter list to the given record.
@ TK_FunctionTemplateSpecialization
unsigned getNumTemplateArgs() const
Returns the number of explicit template arguments that were given.
UsingEnumDecl * getInstantiatedFromUsingEnumDecl(UsingEnumDecl *Inst)
If the given using-enum decl Inst is an instantiation of another using-enum decl, return it.
const Expr * getInitExpr() const
@ Specialization
We are substituting template parameters for template arguments in order to form a template specializa...
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
void VisitVarTemplatePartialSpecializationDecl(VarTemplatePartialSpecializationDecl *D)
void VisitFunctionTemplateDecl(FunctionTemplateDecl *D)
void VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D)
QualType getExpansionType(unsigned I) const
Retrieve a particular expansion type within an expanded parameter pack.
unsigned getIdentifierNamespace() const
void VisitNamedDecl(NamedDecl *D)
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
FunctionTemplateSpecializationInfo * getTemplateSpecializationInfo() const
If this function is actually a function template specialization, retrieve information about this func...
bool hasImplicitReturnZero() const
Whether falling off this function implicitly returns null/zero.
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
void VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D)
ObjCDeclQualifier getObjCDeclQualifier() const
Parts getParts() const
Get the decomposed parts of this declaration.
@ DECL_IMPLICIT_PARAM
An ImplicitParamDecl record.
const ObjCMethodDecl * getObjCMethodRedeclaration(const ObjCMethodDecl *MD) const
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
bool isEmbeddedInDeclarator() const
True if this tag declaration is "embedded" (i.e., defined or declared for the very first time) in the...
@ DECL_UNRESOLVED_USING_TYPENAME
An UnresolvedUsingTypenameDecl record.
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the variable template specialization.
TypedefNameDecl * getTypedefNameForAnonDecl() const
@ DECL_CLASS_TEMPLATE
A ClassTemplateDecl record.
void VisitTypeAliasDecl(TypeAliasDecl *D)
@ DECL_OBJC_PROPERTY_IMPL
A ObjCPropertyImplDecl record.
SourceLocation getPropertyIvarDeclLoc() const
unsigned getChainingSize() const
Represents a pack of using declarations that a single using-declarator pack-expanded into.
const FunctionDecl * getOperatorDelete() const
Represents a C++ Modules TS module export declaration.
PropertyControl getPropertyImplementation() const
void VisitEnumDecl(EnumDecl *D)
Declaration of a redeclarable template.
uint32_t Part1
{01234567-...
@ DECL_REQUIRES_EXPR_BODY
A RequiresExprBodyDecl record.
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
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...
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
unsigned getManglingNumber() const
Represents a variable template specialization, which refers to a variable template with a given set o...
bool isTopLevelDeclInObjCContainer() const
Whether this declaration is a top-level declaration (function, global variable, etc....
Represents the body of a CapturedStmt, and serves as its DeclContext.
@ DECL_FIELD
A FieldDecl record.
@ DECL_TYPEALIAS
A TypeAliasDecl record.
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this function is an instantiation of a member function of a class template specialization,...
void VisitClassScopeFunctionSpecializationDecl(ClassScopeFunctionSpecializationDecl *D)
void VisitObjCImplementationDecl(ObjCImplementationDecl *D)
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
bool isOverriding() const
Whether this method overrides any other in the class hierarchy.
size_t param_size() const
bool isPartOfPerModuleInitializer(const Decl *D)
Determine whether the given declaration will be included in the per-module initializer if it needs to...
@ DECL_UNNAMED_GLOBAL_CONSTANT
A UnnamedGlobalConstantDecl record.
SourceManager & getSourceManager()
bool isNonTrivialToPrimitiveDestroy() const
bool hasTypeConstraint() const
Determine whether this template parameter has a type-constraint.
bool isReferenced() const
Whether any declaration of this entity was referenced.
@ DECL_RECORD
A RecordDecl record.
@ DECL_FUNCTION_TEMPLATE
A FunctionTemplateDecl record.
@ DECL_OBJC_INTERFACE
A ObjCInterfaceDecl record.
void VisitObjCImplDecl(ObjCImplDecl *D)
unsigned getNumPositiveBits() const
Returns the width in bits required to store all the non-negative enumerators of this enum.
Expr * getCombinerOut()
Get Out variable of the combiner.
TypeSourceInfo * getDefaultArgumentInfo() const
Retrieves the default argument's source information, if any.
const ObjCInterfaceDecl * getClassInterface() const
This class handles loading and caching of source files into memory.
@ DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
A ClassTemplatePartialSpecializationDecl record.
ModuleOwnershipKind getModuleOwnershipKind() const
Get the kind of module ownership for this declaration.
bool hasCapturedVLAType() const
Determine whether this member captures the variable length array type.
void VisitFriendDecl(FriendDecl *D)
VarTemplatePartialSpecializationDecl * getInstantiatedFromMember() const
Retrieve the member variable template partial specialization from which this particular variable temp...
void AddTemplateSpecializations(DeclTy *D)
void VisitUsingPackDecl(UsingPackDecl *D)
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
void AddSourceLocation(SourceLocation Loc, LocSeq *Seq=nullptr)
Emit a source location.
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
FunctionTemplateDecl * getTemplate() const
Retrieve the template from which this function was specialized.
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
RedeclarableTemplateDecl::SpecEntryTraits< EntryType >::DeclType * getSpecializationDecl(EntryType &T)
Get the specialization decl from an entry in the specialization list.
void VisitFunctionDecl(FunctionDecl *D)
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
void VisitImportDecl(ImportDecl *D)
@ DECL_CXX_RECORD
A CXXRecordDecl record.
bool isThisDeclarationADefinition() const
Determine whether this particular declaration of this class is actually also a definition.
ArrayRef< Capture > captures() const
DeclarationName getVarName()
Get the name of the variable declared in the mapper.
bool doesNotEscape() const
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
unsigned getODRHash()
Returns ODRHash of the function.
Represents a dependent using declaration which was marked with typename.
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D)
static bool classofKind(Kind K)
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
bool isInline() const
Whether this variable is (C++1z) inline.
Declaration of a template function.
void VisitDeclaratorDecl(DeclaratorDecl *D)
@ DECL_FILE_SCOPE_ASM
A FileScopeAsmDecl record.
@ DECL_OBJC_COMPATIBLE_ALIAS
A ObjCCompatibleAliasDecl record.
bool isExpandedParameterPack() const
Whether this parameter is a template type parameter pack that has a known list of different type-cons...
ObjCMethodDecl * getSetterMethodDecl() const
SourceLocation getPointOfInstantiation() const
Retrieve the first point of instantiation of this function template specialization.
unsigned protocol_size() const
ClassTemplatePartialSpecializationDecl * getInstantiatedFromMember() const
Retrieve the member class template partial specialization from which this particular class template p...
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any.
SourceLocation getTemplateKeywordLoc() const
Gets the location of the template keyword, if present.
The top declaration context.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
ConstexprSpecKind getConstexprKind() const
bool hasRelatedResultType() const
Determine whether this method has a result type that is related to the message receiver's type.
@ DECL_TEMPLATE_TEMPLATE_PARM
A TemplateTemplateParmDecl record.
OMPDeclareMapperDecl * getPrevDeclInScope()
Get reference to previous declare mapper construct in the same scope with the same name.
bool isMemberSpecialization()
Determines whether this variable template partial specialization was a specialization of a member par...
overridden_method_range overridden_methods() const
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the class template specialization.
bool hasSkippedBody() const
True if the function was a definition but its body was skipped.
void VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D)
This represents '#pragma omp declare reduction ...' directive.
Represents the body of a requires-expression.
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
Describes a module import declaration, which makes the contents of the named module visible in the cu...
AccessSpecifier getAccess() const
void VisitFieldDecl(FieldDecl *D)
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
SourceLocation getUsingLoc() const
The source location of the 'using' keyword.
bool hasNonTrivialToPrimitiveDestructCUnion() const
SourceLocation getSuperClassLoc() const
Represents a block literal declaration, which is like an unnamed FunctionDecl.
void VisitObjCIvarDecl(ObjCIvarDecl *D)
TemplatedKind getTemplatedKind() const
What kind of templated function this is.
unsigned getNumExpansionTypes() const
Retrieves the number of expansion types in an expanded parameter pack.
protocol_range protocols() const
Declaration of a C++2a concept.
@ DECL_VAR_TEMPLATE_SPECIALIZATION
A VarTemplateSpecializationDecl record.
OMPDeclareReductionDecl * getPrevDeclInScope()
Get reference to previous declare reduction construct in the same scope with the same name.
@ DECL_CXX_DEDUCTION_GUIDE
A CXXDeductionGuideDecl record.
void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D)
bool isObjCForDecl() const
Determine whether this variable is a for-loop declaration for a for-in statement in Objective-C.
unsigned getPosition() const
Get the position of the template parameter within its parameter list.
bool isCopyDeductionCandidate() const
bool hasDestructors() const
Do any of the ivars of this class (not counting its base classes) require non-trivial destruction?
A POD class for pairing a NamedDecl* with an access specifier.
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this variable is an instantiation of a static data member of a class template specialization,...
void VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D)
@ DECL_CXX_DESTRUCTOR
A CXXDestructorDecl record.
Expr * getBitWidth() const
void VisitMSGuidDecl(MSGuidDecl *D)
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
bool isStaticDataMember() const
Determines whether this is a static data member.
Data that is common to all of the declarations of a given function template.
TemplateParameterList * getExpansionTemplateParameters(unsigned I) const
Retrieve a particular expansion type within an expanded parameter pack.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Get the template arguments as written.
ObjCMethodDecl * getSetterMethodDecl() const
void VisitOMPThreadPrivateDecl(OMPThreadPrivateDecl *D)
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
A decomposition declaration.
Stmt * getBody(const FunctionDecl *&Definition) const
Retrieve the body (definition) of the function.
FunctionTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
SourceLocation getRParenLoc() const
decltype(T::PartialSpecializations) & getPartialSpecializations(T *Common)
Get the list of partial specializations from a template's common ptr.
void VisitTypeDecl(TypeDecl *D)
@ DECL_OBJC_CATEGORY
A ObjCCategoryDecl record.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
bool isInvalidDecl() const
void VisitRedeclarable(Redeclarable< T > *D)
@ DECL_OBJC_AT_DEFS_FIELD
A ObjCAtDefsFieldDecl record.
Selector getSetterName() const
@ EXPR_IMPLICIT_CAST
An ImplicitCastExpr record.
void VisitValueDecl(ValueDecl *D)
@ DECL_LINKAGE_SPEC
A LinkageSpecDecl record.
void VisitExportDecl(ExportDecl *D)
@ DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION
A VarTemplatePartialSpecializationDecl record.
bool isEscapingByref() const
Indicates the capture is a __block variable that is captured by a block that can potentially escape (...
Expr * getGetterCXXConstructor() const
@ DECL_CLASS_TEMPLATE_SPECIALIZATION
A ClassTemplateSpecializationDecl record.
bool isThisDeclarationADefinition() const
Return true if this declaration is a completion definition of the type.
StringLiteral * getMessage()
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
Represents the declaration of a label.
ImplicitParamDecl * getSelfDecl() const
TemplateParameterList * getTemplateParameterList(unsigned i) const
@ DECL_VAR_TEMPLATE
A VarTemplateDecl record.
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this enumeration is an instantiation of a member enumeration of a class template specialization,...
IdentifierInfo * getSetterId() const
void VisitCXXRecordDecl(CXXRecordDecl *D)
const llvm::APSInt & getInitVal() const
QualType getUnderlyingType() const
bool getSynthesize() const
Represents a C++ destructor within a class.
ObjCCategoryDecl * getCategoryListRaw() const
Retrieve the raw pointer to the start of the category/extension list.
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.
void VisitRequiresExprBodyDecl(RequiresExprBodyDecl *D)
EnumDecl * getMostRecentDecl()
void VisitCXXConversionDecl(CXXConversionDecl *D)
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
NamedDecl * getFriendDecl() const
If this friend declaration names a templated function (or a member function of a templated type),...
void VisitLifetimeExtendedTemporaryDecl(LifetimeExtendedTemporaryDecl *D)
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
SourceLocation getBeginLoc() const LLVM_READONLY
unsigned getNumExpansionTemplateParameters() const
Retrieves the number of expansion template parameters in an expanded parameter pack.
@ DECL_OBJC_PROPERTY
A ObjCPropertyDecl record.
bool hasSkippedBody() const
True if the method was a definition but its body was skipped.
Represents a variable declaration or definition.
QualType getReturnType() const
@ DECL_OMP_REQUIRES
An OMPRequiresDecl record.
void VisitTranslationUnitDecl(TranslationUnitDecl *D)
@ DECL_CXX_CONVERSION
A CXXConversionDecl record.
QualType getPromotionType() const
Return the integer type that enumerators should promote to.
@ DECL_USING_DIRECTIVE
A UsingDirecitveDecl record.
Represents the declaration of a struct/union/class/enum.
This represents '#pragma omp declare mapper ...' directive.
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
@ DECL_ENUM
An EnumDecl record.
Represents a declaration of a type.
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
@ DECL_STATIC_ASSERT
A StaticAssertDecl record.
unsigned getNumTemplates() const
Returns the number of function templates that this might be a specialization of.
ArrayRef< SourceLocation > getIdentifierLocs() const
Retrieves the locations of each of the identifiers that make up the complete module name in the impor...
void VisitConstructorUsingShadowDecl(ConstructorUsingShadowDecl *D)
@ DECL_OBJC_TYPE_PARAM
An ObjCTypeParamDecl record.
An instance of this object exists for each enum constant that is defined.
@ DECL_MS_GUID
A MSGuidDecl record.
ImplicitParamDecl * getParam(unsigned i) const
SourceLocation getEndLoc() const LLVM_READONLY
static bool classofKind(Kind K)
void VisitFriendTemplateDecl(FriendTemplateDecl *D)
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
TypeSourceInfo * getReturnTypeSourceInfo() const
@ DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK
A TemplateTemplateParmDecl record that stores an expanded template template parameter pack.
Expr * getCombinerIn()
Get In variable of the combiner.
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Copy initialization expr of a __block variable and a boolean flag that indicates whether the expressi...
Writes an AST file containing the contents of a translation unit.
const TemplateArgumentList & getTemplateInstantiationArgs() const
Retrieve the set of template arguments that should be used to instantiate members of the class templa...
bool isParamDestroyedInCallee() const
Represents a dependent using declaration which was not marked with typename.
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
SourceLocation getIvarLBraceLoc() const
void VisitObjCMethodDecl(ObjCMethodDecl *D)
void VisitIndirectFieldDecl(IndirectFieldDecl *D)
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
void VisitEnumConstantDecl(EnumConstantDecl *D)
@ EXPR_DECL_REF
A DeclRefExpr record.
Declaration of a template type parameter.
unsigned getFunctionScopeDepth() const
bool isAnonymousStructOrUnion() const
Whether this is an anonymous struct or union.
llvm::PointerUnion< ClassTemplateDecl *, ClassTemplatePartialSpecializationDecl * > getSpecializedTemplateOrPartial() const
Retrieve the class template or class template partial specialization which was specialized by this.
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
A template parameter object.
NamedDecl * getInstantiatedFromUsingDecl(NamedDecl *Inst)
If the given using decl Inst is an instantiation of another (possibly unresolved) using decl,...
const ObjCInterfaceDecl * getSuperClass() const
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
bool isMutable() const
Determines whether this field is mutable (C++ only).
SourceLocation getPointOfInstantiation() const
Retrieve the first point of instantiation of this member.
bool isNonTrivialToPrimitiveCopy() const
const VariableArrayType * getCapturedVLAType() const
Get the captured variable length array type.
@ DECL_OBJC_IMPLEMENTATION
A ObjCImplementationDecl record.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Represents a C++ using-declaration.
NamedDecl * getMostRecentDecl()
ObjCCategoryDecl - Represents a category declaration.
@ DECL_FRIEND
A FriendDecl record.
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
TypeSourceInfo * getTypeAsWritten() const
Gets the type of this specialization as it was written by the user, if it was so written.
@ DECL_OBJC_PROTOCOL
A ObjCProtocolDecl record.
SourceLocation getPointOfInstantiation() const
Get the point of instantiation (if any), or null if none.
ExplicitSpecifier getExplicitSpecifier()
@ DECL_BLOCK
A BlockDecl record.
@ DECL_OMP_DECLARE_REDUCTION
An OMPDeclareReductionDecl record.
const Expr * getExpr() const
bool isThisDeclarationADemotedDefinition() const
If this definition should pretend to be a declaration.
VarTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
static DeclType * getDecl(EntryType *D)
Expr * getUninstantiatedDefaultArg()
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D)
void VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D)
TypeSourceInfo * getFriendType() const
If this friend declaration names a templated type (or a dependent member type of a templated type),...
ObjCDeclQualifier getObjCDeclQualifier() const
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
DeclCode
Record codes for each kind of declaration.
ASTDeclWriter(ASTWriter &Writer, ASTContext &Context, ASTWriter::RecordDataImpl &Record)
Represents a C++ using-enum-declaration.
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Represents a C++ struct/union/class.
@ UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
@ DECL_EXPORT
An ExportDecl record.
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
SourceLocation getCategoryNameLoc() const
void VisitOMPAllocateDecl(OMPAllocateDecl *D)
SourceLocation getAtStartLoc() const
TagDecl * getAnonDeclWithTypedefName(bool AnyRedecl=false) const
Retrieves the tag declaration for which this is the typedef name for linkage purposes,...
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Get the template arguments as written.
void VisitObjCInterfaceDecl(ObjCInterfaceDecl *D)
@ DECL_OBJC_METHOD
A ObjCMethodDecl record.
bool usesSEHTry() const
Indicates the function uses __try.
void VisitEmptyDecl(EmptyDecl *D)
void VisitTemplateParamObjectDecl(TemplateParamObjectDecl *D)
Decl * getPreviousDecl()
Retrieve the previous declaration that declares the same entity as this declaration,...
SourceLocation getBeginLoc() const LLVM_READONLY
Provides information about a function template specialization, which is a FunctionDecl that has been ...
TypeSourceInfo * getExpansionTypeSourceInfo(unsigned I) const
Retrieve a particular expansion type source info within an expanded parameter pack.
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
void VisitImplicitParamDecl(ImplicitParamDecl *D)
protocol_loc_range protocol_locs() const
SourceRange getBraceRange() const
unsigned size_overridden_methods() const
void append(InputIterator begin, InputIterator end)
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
void VisitBlockDecl(BlockDecl *D)
void VisitDecompositionDecl(DecompositionDecl *D)
void VisitTypedefNameDecl(TypedefNameDecl *D)
Represents a C++11 static_assert declaration.
bool isFreeStanding() const
True if this tag is free standing, e.g. "struct foo;".
@ DECL_OMP_ALLOCATE
An OMPAllocateDcl record.
SourceLocation LAngleLoc
The source location of the left angle bracket ('<').
Declaration of a class template.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
@ DECL_VAR
A VarDecl record.
SourceLocation getRAngleLoc() const
StorageClass getStorageClass() const
Returns the storage class as written in the source.
void VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D)
@ DECL_ACCESS_SPEC
An AccessSpecDecl record.
@ DECL_UNRESOLVED_USING_VALUE
An UnresolvedUsingValueDecl record.
Pseudo declaration for capturing expressions.
void VisitLabelDecl(LabelDecl *LD)
bool isMultiVersion() const
True if this function is considered a multiversioned function.
Expr * getInitOrig()
Get Orig variable of the initializer.
SourceLocation getLParenLoc() const
APValue * getValue() const
@ DECL_TEMPLATE_PARAM_OBJECT
A TemplateParamObjectDecl record.
const unsigned int LOCAL_REDECLARATIONS
Record code for a list of local redeclarations of a declaration.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
protocol_range protocols() const
const ObjCInterfaceDecl * getClassInterface() const
@ DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK
A NonTypeTemplateParmDecl record that stores an expanded non-type template parameter pack.
protocol_loc_range protocol_locs() const
bool isObjCMethodParameter() const
The base class of all kinds of template declarations (e.g., class, function, etc.).
bool isExpandedParameterPack() const
Whether this parameter is a non-type template parameter pack that has a known list of different types...
bool isSynthesizedAccessorStub() const
Decl - This represents one declaration (or definition), e.g.
uint16_t Part2
...-89ab-...
PrettyDeclStackTraceEntry - If a crash occurs in the parser while parsing something related to a decl...
void VisitNamespaceAliasDecl(NamespaceAliasDecl *D)
ObjCIvarDecl * getPropertyIvarDecl() const
unsigned getFunctionScopeIndex() const
Returns the index of this parameter in its prototype or method scope.
Represents a ValueDecl that came out of a declarator.
bool isPure() const
Whether this virtual function is pure, i.e.
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
Represents one property declaration in an Objective-C interface.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
void VisitAccessSpecDecl(AccessSpecDecl *D)
InheritedConstructor getInheritedConstructor() const
Get the constructor that this inheriting constructor is based on.
bool isInstanceMethod() const
void VisitClassTemplateDecl(ClassTemplateDecl *D)
bool isTrivialForCall() const
CXXMethodDecl * getSpecialization() const
void VisitCXXMethodDecl(CXXMethodDecl *D)
@ SD_Static
Static storage duration.
Linkage getLinkageInternal() const
Determine what kind of linkage this entity has.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
unsigned size() const
Determine the number of type parameters in this list.
unsigned getDepth() const
Get the nesting depth of the template parameter.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
CXXRecordDecl * getPreviousDecl()
SourceLocation getGetterNameLoc() const
void VisitStaticAssertDecl(StaticAssertDecl *D)
ClassTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
FunctionTemplateDecl * getTemplate(unsigned I) const
Returns the i'th template candidate.
SourceLocation getIvarLBraceLoc() const
@ DECL_ENUM_CONSTANT
An EnumConstantDecl record.
ExplicitSpecifier getExplicitSpecifier()
void RegisterTemplateSpecialization(const Decl *Template, const Decl *Specialization)
Ensure that this template specialization is associated with the specified template on reload.
@ DECL_MS_PROPERTY
A MSPropertyDecl record.
unsigned getContextParamPosition() const
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
@ DECL_OBJC_CATEGORY_IMPL
A ObjCCategoryImplDecl record.
void VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *D)
@ DECL_CONCEPT
A ConceptDecl record.
bool hasObjectMember() const
An object for streaming information to a record.
SourceLocation getIvarRBraceLoc() const
decl_type * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
bool hasNonZeroConstructors() const
Do any of the ivars of this class (not counting its base classes) require construction other than zer...
Represents a field declaration created by an @defs(...).
const Expr * getInit() const
SourceLocation getExternLoc() const
Gets the location of the extern keyword, if present.
void VisitOMPRequiresDecl(OMPRequiresDecl *D)
bool hasNonTrivialToPrimitiveDefaultInitializeCUnion() const
void VisitObjCPropertyDecl(ObjCPropertyDecl *D)
@ DECL_TYPEDEF
A TypedefDecl record.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
SourceLocation getRBraceLoc() const
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
void VisitParmVarDecl(ParmVarDecl *D)
Expr * getCombiner()
Get combiner expression of the declare reduction construct.
ObjCPropertyDecl * getPropertyDecl() const
NamedDecl * getInstantiatedFrom() const
Retrieve the member declaration from which this member was instantiated.
bool isPreviousDeclInSameBlockScope() const
Whether this local extern variable declaration's previous declaration was declared in the same block ...
llvm::PointerUnion< VarTemplateDecl *, VarTemplatePartialSpecializationDecl * > getSpecializedTemplateOrPartial() const
Retrieve the variable template or variable template partial specialization which was specialized by t...
ThreadStorageClassSpecifier getTSCSpec() const
ObjCPropertyAttribute::Kind getPropertyAttributesAsWritten() const
Expr * getTemporaryExpr()
Retrieve the expression to which the temporary materialization conversion was applied.
SourceLocation getExternLoc() const
Represents the declaration of an Objective-C type parameter.
Selector getGetterName() const
SourceLocation getSetterNameLoc() const
bool isARCPseudoStrong() const
Determine whether this variable is an ARC pseudo-__strong variable.
Stmt * getBody() const override
Retrieve the body of this method, if it has one.
void VisitObjCProtocolDecl(ObjCProtocolDecl *D)
bool isCXXForRangeDecl() const
Determine whether this variable is the for-range-declaration in a C++0x for-range statement.
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
bool isAnonymousNamespace() const
Returns true if this is an anonymous namespace declaration.
ObjCMethodDecl - Represents an instance or class method declaration.
void VisitConceptDecl(ConceptDecl *D)
@ DECL_FUNCTION
A FunctionDecl record.
Represents a C++ deduction guide declaration.
@ DECL_INDIRECTFIELD
A IndirectFieldDecl record.
InitKind getInitializerKind() const
Get initializer kind.
SourceLocation getEndOfDefinitionLoc() const
bool isLateTemplateParsed() const
Whether this templated function will be late parsed.
ImplicitParamDecl * getCmdDecl() const
@ CInit
C-style initialization with assignment.
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
NameKind getNameKind() const
Determine what kind of name this is.
void VisitUnnamedGlobalConstantDecl(UnnamedGlobalConstantDecl *D)
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D)
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
Represents a field injected from an anonymous union/struct into the parent scope.
unsigned getNumExpansionParameters() const
Retrieves the number of parameters in an expanded parameter pack.
uint64_t Emit(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, followed by its substatements, and return its offset.
const APValue & getValue() const
TypeSourceInfo * getTypeSourceInfo() const
uint8_t Part4And5[8]
...-0123-456789abcdef}
@ DECL_TEMPLATE_TYPE_PARM
A TemplateTypeParmDecl record.
const StringLiteral * getAsmString() const
ArrayRef< Decl > getPartialSpecializations(FunctionTemplateDecl::Common *)
TypeAliasTemplateDecl * getDescribedAliasTemplate() const
@ GVA_AvailableExternally
TypeSourceInfo * getSuperClassTInfo() const
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
unsigned getNumNegativeBits() const
Returns the width in bits required to store all the negative enumerators of this enum.
ObjCIvarDecl - Represents an ObjC instance variable.
bool isKNRPromoted() const
True if the value passed to this parameter must undergo K&R-style default argument promotion:
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
SourceLocation getIvarRBraceLoc() const
An instance of this class represents the declaration of a property member.
bool hasTypename() const
Return true if the using declaration has 'typename'.
bool hasUninstantiatedDefaultArg() const
A simple visitor class that helps create declaration visitors.
void VisitRecordDecl(RecordDecl *D)
@ DECL_LIFETIME_EXTENDED_TEMPORARY
An LifetimeExtendedTemporaryDecl record.
void VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D)
bool isExpandedParameterPack() const
Whether this parameter is a template template parameter pack that has a known list of different templ...
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
void VisitUsingDirectiveDecl(UsingDirectiveDecl *D)
bool isCompleteDefinitionRequired() const
Return true if this complete decl is required to be complete for some existing use.
bool isNonTrivialToPrimitiveDefaultInitialize() const
Functions to query basic properties of non-trivial C structs.
Represents an Objective-C protocol declaration.
CXXMethodDecl * getMostRecentDecl()
RecordDecl * getMostRecentDecl()
@ DECL_CXX_CONSTRUCTOR
A CXXConstructorDecl record.
bool isValid() const
Return true if this is a valid SourceLocation object.
uint16_t Part3
...-cdef-...
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
SourceLocation getUsingLoc() const
Return the location of the using keyword.
bool isMemberSpecialization()
Determines whether this class template partial specialization template was a specialization of a memb...
This represents '#pragma omp requires...' directive.
RedeclarableTemplateDecl * getInstantiatedFromMemberTemplate() const
Retrieve the member template from which this template was instantiated, or nullptr if this template w...
StringRef getName() const
protocol_loc_range protocol_locs() const
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
void VisitPragmaDetectMismatchDecl(PragmaDetectMismatchDecl *D)
void VisitCXXDestructorDecl(CXXDestructorDecl *D)
@ DECL_OMP_CAPTUREDEXPR
An OMPCapturedExprDecl record.
Expr * getPlaceholderTypeConstraint() const
Return the constraint introduced by the placeholder type of this non-type template parameter (if any)...
SourceLocation getTemplateKeywordLoc() const
Gets the location of the template keyword, if present.
void VisitUnresolvedUsingIfExistsDecl(UnresolvedUsingIfExistsDecl *D)
bool hasInheritedPrototype() const
Whether this function inherited its prototype from a previous declaration.
bool isExplicitlyDefaulted() const
Whether this function is explicitly defaulted.
This node is generated when a using-declaration that was annotated with attribute((using_if_exists)) ...
bool canAvoidCopyToHeap() const
ValueDecl * getExtendingDecl()
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D)
TagKind getTagKind() const
void VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D)
Base class for declarations which introduce a typedef-name.
VarTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
void VisitTemplateDecl(TemplateDecl *D)
ExplicitSpecKind getKind() const
ObjCContainerDecl - Represents a container for method declarations.
const ASTTemplateArgumentListInfo * TemplateArgumentsAsWritten
The template arguments as written in the sources, if provided.
SourceLocation getCategoryNameLoc() const
Declaration of an alias template.
void VisitObjCTypeParamDecl(ObjCTypeParamDecl *D)
DependentFunctionTemplateSpecializationInfo * getDependentSpecializationInfo() const
TypeSourceInfo * getSignatureAsWritten() const
void VisitTypedefDecl(TypedefDecl *D)
bool isPropertyAccessor() const
@ DECL_NAMESPACE_ALIAS
A NamespaceAliasDecl record.
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
static bool classofKind(Kind K)
Expr * getBinding() const
Get the expression to which this declaration is bound.
ArrayRef< ParmVarDecl * > parameters() const
unsigned llvm::PointerUnion< const Decl *, const Expr * > DeclTy
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template specialization this is.
@ DECL_IMPORT
An ImportDecl recording a module import.
bool isRedeclaration() const
True if this is a method redeclaration in the same interface.
const DeclarationNameInfo & getConceptNameInfo() const
SourceLocation getAtLoc() const
ModuleFile * getOwningModuleFile(const Decl *D)
Retrieve the module file that owns the given declaration, or NULL if the declaration is not from a mo...
void VisitLinkageSpecDecl(LinkageSpecDecl *D)
Represents a #pragma detect_mismatch line.
@ DECL_LABEL
A LabelDecl record.
SourceLocation getEnumLoc() const
The source location of the 'enum' keyword.
SourceLocation getLAngleLoc() const
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Represents the declaration of a typedef-name via a C++11 alias-declaration.
unsigned getPosition() const
Get the position of the template parameter within its parameter list.
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template specialization this is.
void VisitBindingDecl(BindingDecl *D)
Declaration of a variable template.
@ DECL_PRAGMA_DETECT_MISMATCH
A PragmaDetectMismatchDecl record.
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
bool isMemberSpecialization() const
Determines whether this template was a specialization of a member template.
This represents one expression.
ArrayRef< NamedDecl * > chain() const
StringRef getValue() const
FunctionTemplateDecl * getDescribedFunctionTemplate() const
Retrieves the function template that is described by this function declaration.
void VisitVarTemplateDecl(VarTemplateDecl *D)
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
const Type * getTypeForDecl() const
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
FieldDecl * getInstantiatedFromUnnamedFieldDecl(FieldDecl *Field)
size_t param_size() const
@ UPD_CXX_ADDED_ANONYMOUS_NAMESPACE
const APValue & getValue() const
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
unsigned getNumTemplateParameters() const
SourceRange getAtEndRange() const
void AddFirstDeclFromEachModule(const Decl *D, bool IncludeLocal)
Add to the record the first declaration from each module file that provides a declaration of D.
Represents a class template specialization, which refers to a class template with a given set of temp...
ObjCPropertyAttribute::Kind getPropertyAttributes() const
@ DECL_CONTEXT_VISIBLE
A record that stores the set of declarations that are visible from a given DeclContext.
bool DeclMustBeEmitted(const Decl *D)
Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is onl...
ArrayRef< ParmVarDecl * > parameters() const
unsigned getDepth() const
Get the nesting depth of the template parameter.
bool isExceptionVariable() const
Determine whether this variable is the exception variable in a C++ catch statememt or an Objective-C ...
SourceLocation getLocation() const
@ DECL_OBJC_IVAR
A ObjCIvarDecl record.
TemplateParameterList * getFriendTypeTemplateParameterList(unsigned N) const
static void addExplicitSpecifier(ExplicitSpecifier ES, ASTRecordWriter &Record)
bool isCanonicalDecl() const
Whether this particular Decl is a canonical one.
Represent a C++ namespace.
Represents a function declaration or definition.
void VisitObjCContainerDecl(ObjCContainerDecl *D)
SourceLocation RAngleLoc
The source location of the right angle bracket ('>').
bool capturesCXXThis() const
Represents a struct/union/class.
UsingShadowDecl * getInstantiatedFromUsingShadowDecl(UsingShadowDecl *Inst)
ObjCList - This is a simple template class used to hold various lists of decls etc,...
void VisitUsingDecl(UsingDecl *D)
bool isThisDeclarationADefinition() const
Determine whether this particular declaration is also the definition.
StorageClass getStorageClass() const
Returns the storage class as written in the source.
@ DECL_NON_TYPE_TEMPLATE_PARM
A NonTypeTemplateParmDecl record.
bool isInline() const
Returns true if this is an inline namespace declaration.
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
void VisitUsingShadowDecl(UsingShadowDecl *D)
@ DECL_BINDING
A BindingDecl record.
unsigned protocol_size() const
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
An artificial decl, representing a global anonymous constant value which is uniquified by value withi...
TypeSourceInfo * getTypeSourceInfo() const
bool hasInheritedDefaultArg() const
NamespaceDecl * getAnonymousNamespace() const
Retrieve the anonymous namespace nested inside this namespace, if any.
void VisitCXXConstructorDecl(CXXConstructorDecl *D)
bool isConversionFromLambda() const
OMPChildren * Data
Data, associated with the directive.
TypeSourceInfo * getTypeAsWritten() const
Gets the type of this specialization as it was written by the user, if it was so written.
@ DECL_CONTEXT_LEXICAL
A record that stores the set of declarations that are lexically stored within a given DeclContext.
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
EnumDecl * getEnumDecl() const
unsigned param_size() const
Decl * getMostRecentDecl()
Retrieve the most recent declaration that declares the same entity as this declaration (which may be ...
const char * getDeclKindName() const
MemberSpecializationInfo * getMemberSpecializationInfo() const
Get the specialization info if this function template specialization is also a member specialization:
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
bool blockMissingReturnType() const
unsigned getNumCaptures() const
Returns the number of captured variables.
Represents a static or instance method of a struct/union/class.
DeclContext * getDeclContext()
ImplementationControl getImplementationControl() const
Expr * getOperatorDeleteThisArg() const
@ TK_DependentFunctionTemplateSpecialization