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()
864 void Decl::setAttrsImpl(const AttrVec &attrs, ASTContext &Ctx) { in setAttrsImpl()
874 void Decl::dropAttrs() { in dropAttrs()
881 void Decl::addAttr(Attr *A) { in addAttr()
904 const AttrVec &Decl::getAttrs() const { in getAttrs()
909 Decl *Decl::castFromDeclContext (const DeclContext *D) { in castFromDeclContext()
910 Decl::Kind DK = D->getDeclKind(); in castFromDeclContext()
914 case Decl::NAME: \ in castFromDeclContext()
915 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
922 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
928 DeclContext *Decl::castToDeclContext(const Decl *D) { in castToDeclContext()
929 Decl::Kind DK = D->getKind(); in castToDeclContext()
933 case Decl::NAME: \ in castToDeclContext()
934 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
941 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
947 SourceLocation Decl::getBodyRBrace() const { in getBodyRBrace()
963 bool Decl::AccessDeclContextSanity() const { in AccessDeclContextSanity()
994 static Decl::Kind getKind(const Decl *D) { return D->getKind(); } in getKind()
995 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind()
997 int64_t Decl::getID() const { in getID()
998 return getASTContext().getAllocator().identifyKnownAlignedObject<Decl>(this); in getID()
1001 const FunctionType *Decl::getFunctionType(bool BlocksToo) const { in getFunctionType()
1022 template <class T> static Decl *getNonClosureContext(T *D) { in getNonClosureContext()
1023 if (getKind(D) == Decl::CXXMethod) { in getNonClosureContext()
1041 Decl *Decl::getNonClosureContext() { in getNonClosureContext()
1045 Decl *DeclContext::getNonClosureAncestor() { in getNonClosureAncestor()
1053 DeclContext::DeclContext(Decl::Kind K) { in DeclContext()
1063 bool DeclContext::classof(const Decl *D) { in classof()
1066 #define DECL_CONTEXT(NAME) case Decl::NAME: in classof()
1073 if (D->getKind() >= Decl::first##NAME && \ in classof()
1074 D->getKind() <= Decl::last##NAME) \ in classof()
1159 if (cast<Decl>(this)->getFriendObjectKind()) in isDependentContext()
1171 if (getDeclKind() == Decl::Enum) in isTransparentContext()
1174 return getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export; in isTransparentContext()
1179 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1180 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1193 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1194 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1218 case Decl::TranslationUnit: in getPrimaryContext()
1219 case Decl::ExternCContext: in getPrimaryContext()
1220 case Decl::LinkageSpec: in getPrimaryContext()
1221 case Decl::Export: in getPrimaryContext()
1222 case Decl::Block: in getPrimaryContext()
1223 case Decl::Captured: in getPrimaryContext()
1224 case Decl::OMPDeclareReduction: in getPrimaryContext()
1225 case Decl::OMPDeclareMapper: in getPrimaryContext()
1226 case Decl::RequiresExprBody: in getPrimaryContext()
1230 case Decl::Namespace: in getPrimaryContext()
1234 case Decl::ObjCMethod: in getPrimaryContext()
1237 case Decl::ObjCInterface: in getPrimaryContext()
1243 case Decl::ObjCProtocol: in getPrimaryContext()
1249 case Decl::ObjCCategory: in getPrimaryContext()
1252 case Decl::ObjCImplementation: in getPrimaryContext()
1253 case Decl::ObjCCategoryImpl: in getPrimaryContext()
1257 if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) { in getPrimaryContext()
1277 assert(getDeclKind() >= Decl::firstFunction && in getPrimaryContext()
1278 getDeclKind() <= Decl::lastFunction && in getPrimaryContext()
1288 if (getDeclKind() != Decl::Namespace) { in collectAllContexts()
1301 std::pair<Decl *, Decl *>
1302 DeclContext::BuildDeclChain(ArrayRef<Decl *> Decls, in BuildDeclChain()
1305 Decl *FirstNewDecl = nullptr; in BuildDeclChain()
1306 Decl *PrevDecl = nullptr; in BuildDeclChain()
1345 SmallVector<Decl*, 64> Decls; in LoadLexicalDeclsFromExternalStorage()
1360 Decl *ExternalFirst, *ExternalLast; in LoadLexicalDeclsFromExternalStorage()
1414 bool DeclContext::containsDecl(Decl *D) const { in containsDecl()
1419 bool DeclContext::containsDeclAndLoad(Decl *D) const { in containsDeclAndLoad()
1464 void DeclContext::removeDecl(Decl *D) { in removeDecl()
1477 for (Decl *I = FirstDecl; true; I = I->NextInContextAndBits.getPointer()) { in removeDecl()
1515 void DeclContext::addHiddenDecl(Decl *D) { in addHiddenDecl()
1541 void DeclContext::addDecl(Decl *D) { in addDecl()
1549 void DeclContext::addDeclInternal(Decl *D) { in addDeclInternal()
1628 assert(getDeclKind() != Decl::LinkageSpec && in lookup()
1629 getDeclKind() != Decl::Export && in lookup()
1641 (void)cast<Decl>(this)->getMostRecentDecl(); in lookup()
1693 assert(getDeclKind() != Decl::LinkageSpec && in noload_lookup()
1694 getDeclKind() != Decl::Export && in noload_lookup()
1755 for (Decl *D = FirstDecl; D; D = D->getNextDeclInContext()) { in localUncachedLookup()
1770 bool SkipRecords = getDeclKind() == Decl::Kind::Enum && in getRedeclContext()
1867 auto *DCAsDecl = cast<Decl>(this); in makeDeclVisibleInContextWithFlags()