Lines Matching refs:Decl

63 void Decl::updateOutOfDate(IdentifierInfo &II) const {  in updateOutOfDate()
68 static_assert(alignof(Decl) >= alignof(DERIVED##Decl), \
73 void *Decl::operator new(std::size_t Size, const ASTContext &Context, in operator new()
77 static_assert(sizeof(unsigned) * 2 >= alignof(Decl), in operator new()
93 void *Decl::operator new(std::size_t Size, const ASTContext &Ctx, in operator new()
103 llvm::offsetToAlignment(sizeof(Module *), llvm::Align(alignof(Decl))); in operator new()
108 Parent ? cast<Decl>(Parent)->getOwningModule() : nullptr; in operator new()
114 Module *Decl::getOwningModuleSlow() const { in getOwningModuleSlow()
119 bool Decl::hasLocalOwningModuleStorage() const { in hasLocalOwningModuleStorage()
123 const char *Decl::getDeclKindName() const { in getDeclKindName()
132 void Decl::setInvalidDecl(bool Invalid) { in setInvalidDecl()
157 #define DECL(DERIVED, BASE) case Decl::DERIVED: return #DERIVED; in getDeclKindName()
164 bool Decl::StatisticsEnabled = false;
165 void Decl::EnableStatistics() { in EnableStatistics()
169 void Decl::PrintStats() { in PrintStats()
181 totalBytes += (int)(n##DERIVED##s * sizeof(DERIVED##Decl)); \ in PrintStats()
183 << sizeof(DERIVED##Decl) << " each (" \ in PrintStats()
184 << n##DERIVED##s * sizeof(DERIVED##Decl) \ in PrintStats()
193 void Decl::add(Kind k) { in add()
201 bool Decl::isTemplateParameterPack() const { in isTemplateParameterPack()
211 bool Decl::isParameterPack() const { in isParameterPack()
218 FunctionDecl *Decl::getAsFunction() { in getAsFunction()
226 bool Decl::isTemplateDecl() const { in isTemplateDecl()
230 TemplateDecl *Decl::getDescribedTemplate() const { in getDescribedTemplate()
243 const TemplateParameterList *Decl::getDescribedTemplateParams() const { in getDescribedTemplateParams()
253 bool Decl::isTemplated() const { in isTemplated()
265 unsigned Decl::getTemplateDepth() const { in getTemplateDepth()
278 if (Decl *Context = RD->getLambdaContextDecl()) in getTemplateDepth()
283 return cast<Decl>(DC)->getTemplateDepth(); in getTemplateDepth()
286 const DeclContext *Decl::getParentFunctionOrMethod() const { in getParentFunctionOrMethod()
325 Decl::~Decl() = default;
327 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext()
331 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext()
346 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
355 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC, in setDeclContextsImpl()
360 auto *MDC = new (Ctx) Decl::MultipleDC(); in setDeclContextsImpl()
367 bool Decl::isInLocalScopeForInstantiation() const { in isInLocalScopeForInstantiation()
384 bool Decl::isInAnonymousNamespace() const { in isInAnonymousNamespace()
394 bool Decl::isInStdNamespace() const { in isInStdNamespace()
399 TranslationUnitDecl *Decl::getTranslationUnitDecl() { in getTranslationUnitDecl()
414 ASTContext &Decl::getASTContext() const { in getASTContext()
420 const LangOptions &Decl::getLangOpts() const { in getLangOpts()
424 ASTMutationListener *Decl::getASTMutationListener() const { in getASTMutationListener()
428 unsigned Decl::getMaxAlignment() const { in getMaxAlignment()
443 bool Decl::isUsed(bool CheckUsedAttr) const { in isUsed()
444 const Decl *CanonD = getCanonicalDecl(); in isUsed()
458 void Decl::markUsed(ASTContext &C) { in markUsed()
468 bool Decl::isReferenced() const { in isReferenced()
480 ExternalSourceSymbolAttr *Decl::getExternalSourceSymbolAttr() const { in getExternalSourceSymbolAttr()
481 const Decl *Definition = nullptr; in getExternalSourceSymbolAttr()
494 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) { in getExternalSourceSymbolAttr()
501 bool Decl::hasDefiningAttr() const { in hasDefiningAttr()
506 const Attr *Decl::getDefiningAttr() const { in getDefiningAttr()
622 AvailabilityResult Decl::getAvailability(std::string *Message, in getAvailability()
674 VersionTuple Decl::getVersionIntroduced() const { in getVersionIntroduced()
688 bool Decl::canBeWeakImported(bool &IsDefinition) const { in canBeWeakImported()
717 bool Decl::isWeakImported() const { in isWeakImported()
736 unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { in getIdentifierNamespaceForKind()
868 void Decl::setAttrsImpl(const AttrVec &attrs, ASTContext &Ctx) { in setAttrsImpl()
878 void Decl::dropAttrs() { in dropAttrs()
885 void Decl::addAttr(Attr *A) { in addAttr()
908 const AttrVec &Decl::getAttrs() const { in getAttrs()
913 Decl *Decl::castFromDeclContext (const DeclContext *D) { in castFromDeclContext()
914 Decl::Kind DK = D->getDeclKind(); in castFromDeclContext()
918 case Decl::NAME: \ in castFromDeclContext()
919 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
926 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
932 DeclContext *Decl::castToDeclContext(const Decl *D) { in castToDeclContext()
933 Decl::Kind DK = D->getKind(); in castToDeclContext()
937 case Decl::NAME: \ in castToDeclContext()
938 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
945 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
951 SourceLocation Decl::getBodyRBrace() const { in getBodyRBrace()
967 bool Decl::AccessDeclContextSanity() const { in AccessDeclContextSanity()
998 static Decl::Kind getKind(const Decl *D) { return D->getKind(); } in getKind()
999 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind()
1001 int64_t Decl::getID() const { in getID()
1002 return getASTContext().getAllocator().identifyKnownAlignedObject<Decl>(this); in getID()
1005 const FunctionType *Decl::getFunctionType(bool BlocksToo) const { in getFunctionType()
1026 template <class T> static Decl *getNonClosureContext(T *D) { in getNonClosureContext()
1027 if (getKind(D) == Decl::CXXMethod) { in getNonClosureContext()
1045 Decl *Decl::getNonClosureContext() { in getNonClosureContext()
1049 Decl *DeclContext::getNonClosureAncestor() { in getNonClosureAncestor()
1057 DeclContext::DeclContext(Decl::Kind K) { in DeclContext()
1067 bool DeclContext::classof(const Decl *D) { in classof()
1070 #define DECL_CONTEXT(NAME) case Decl::NAME: in classof()
1077 if (D->getKind() >= Decl::first##NAME && \ in classof()
1078 D->getKind() <= Decl::last##NAME) \ in classof()
1163 if (cast<Decl>(this)->getFriendObjectKind()) in isDependentContext()
1175 if (getDeclKind() == Decl::Enum) in isTransparentContext()
1178 return getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export; in isTransparentContext()
1183 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1184 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1197 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1198 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1222 case Decl::ExternCContext: in getPrimaryContext()
1223 case Decl::LinkageSpec: in getPrimaryContext()
1224 case Decl::Export: in getPrimaryContext()
1225 case Decl::Block: in getPrimaryContext()
1226 case Decl::Captured: in getPrimaryContext()
1227 case Decl::OMPDeclareReduction: in getPrimaryContext()
1228 case Decl::OMPDeclareMapper: in getPrimaryContext()
1229 case Decl::RequiresExprBody: in getPrimaryContext()
1233 case Decl::TranslationUnit: in getPrimaryContext()
1235 case Decl::Namespace: in getPrimaryContext()
1239 case Decl::ObjCMethod: in getPrimaryContext()
1242 case Decl::ObjCInterface: in getPrimaryContext()
1248 case Decl::ObjCProtocol: in getPrimaryContext()
1254 case Decl::ObjCCategory: in getPrimaryContext()
1257 case Decl::ObjCImplementation: in getPrimaryContext()
1258 case Decl::ObjCCategoryImpl: in getPrimaryContext()
1262 if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) { in getPrimaryContext()
1282 assert(getDeclKind() >= Decl::firstFunction && in getPrimaryContext()
1283 getDeclKind() <= Decl::lastFunction && in getPrimaryContext()
1300 Decl::Kind Kind = getDeclKind(); in collectAllContexts()
1302 if (Kind == Decl::TranslationUnit) in collectAllContexts()
1304 else if (Kind == Decl::Namespace) in collectAllContexts()
1310 std::pair<Decl *, Decl *>
1311 DeclContext::BuildDeclChain(ArrayRef<Decl *> Decls, in BuildDeclChain()
1314 Decl *FirstNewDecl = nullptr; in BuildDeclChain()
1315 Decl *PrevDecl = nullptr; in BuildDeclChain()
1354 SmallVector<Decl*, 64> Decls; in LoadLexicalDeclsFromExternalStorage()
1369 Decl *ExternalFirst, *ExternalLast; in LoadLexicalDeclsFromExternalStorage()
1423 bool DeclContext::containsDecl(Decl *D) const { in containsDecl()
1428 bool DeclContext::containsDeclAndLoad(Decl *D) const { in containsDeclAndLoad()
1473 void DeclContext::removeDecl(Decl *D) { in removeDecl()
1486 for (Decl *I = FirstDecl; true; I = I->NextInContextAndBits.getPointer()) { in removeDecl()
1524 void DeclContext::addHiddenDecl(Decl *D) { in addHiddenDecl()
1550 void DeclContext::addDecl(Decl *D) { in addDecl()
1558 void DeclContext::addDeclInternal(Decl *D) { in addDeclInternal()
1637 assert(getDeclKind() != Decl::LinkageSpec && in lookup()
1638 getDeclKind() != Decl::Export && in lookup()
1650 (void)cast<Decl>(this)->getMostRecentDecl(); in lookup()
1702 assert(getDeclKind() != Decl::LinkageSpec && in noload_lookup()
1703 getDeclKind() != Decl::Export && in noload_lookup()
1764 for (Decl *D = FirstDecl; D; D = D->getNextDeclInContext()) { in localUncachedLookup()
1779 bool SkipRecords = getDeclKind() == Decl::Kind::Enum && in getRedeclContext()
1876 auto *DCAsDecl = cast<Decl>(this); in makeDeclVisibleInContextWithFlags()