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(bool LexicalParent) const { in getParentFunctionOrMethod()
326 Decl::~Decl() = default;
328 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext()
332 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext()
347 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
356 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC, in setDeclContextsImpl()
361 auto *MDC = new (Ctx) Decl::MultipleDC(); in setDeclContextsImpl()
368 bool Decl::isInLocalScopeForInstantiation() const { in isInLocalScopeForInstantiation()
385 bool Decl::isInAnonymousNamespace() const { in isInAnonymousNamespace()
395 bool Decl::isInStdNamespace() const { in isInStdNamespace()
400 TranslationUnitDecl *Decl::getTranslationUnitDecl() { in getTranslationUnitDecl()
415 ASTContext &Decl::getASTContext() const { in getASTContext()
421 const LangOptions &Decl::getLangOpts() const { in getLangOpts()
425 ASTMutationListener *Decl::getASTMutationListener() const { in getASTMutationListener()
429 unsigned Decl::getMaxAlignment() const { in getMaxAlignment()
444 bool Decl::isUsed(bool CheckUsedAttr) const { in isUsed()
445 const Decl *CanonD = getCanonicalDecl(); in isUsed()
459 void Decl::markUsed(ASTContext &C) { in markUsed()
469 bool Decl::isReferenced() const { in isReferenced()
481 ExternalSourceSymbolAttr *Decl::getExternalSourceSymbolAttr() const { in getExternalSourceSymbolAttr()
482 const Decl *Definition = nullptr; in getExternalSourceSymbolAttr()
495 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) { in getExternalSourceSymbolAttr()
502 bool Decl::hasDefiningAttr() const { in hasDefiningAttr()
507 const Attr *Decl::getDefiningAttr() const { in getDefiningAttr()
623 AvailabilityResult Decl::getAvailability(std::string *Message, in getAvailability()
675 VersionTuple Decl::getVersionIntroduced() const { in getVersionIntroduced()
689 bool Decl::canBeWeakImported(bool &IsDefinition) const { in canBeWeakImported()
718 bool Decl::isWeakImported() const { in isWeakImported()
737 unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { in getIdentifierNamespaceForKind()
870 void Decl::setAttrsImpl(const AttrVec &attrs, ASTContext &Ctx) { in setAttrsImpl()
880 void Decl::dropAttrs() { in dropAttrs()
887 void Decl::addAttr(Attr *A) { in addAttr()
910 const AttrVec &Decl::getAttrs() const { in getAttrs()
915 Decl *Decl::castFromDeclContext (const DeclContext *D) { in castFromDeclContext()
916 Decl::Kind DK = D->getDeclKind(); in castFromDeclContext()
920 case Decl::NAME: \ in castFromDeclContext()
921 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
928 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
934 DeclContext *Decl::castToDeclContext(const Decl *D) { in castToDeclContext()
935 Decl::Kind DK = D->getKind(); in castToDeclContext()
939 case Decl::NAME: \ in castToDeclContext()
940 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
947 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
953 SourceLocation Decl::getBodyRBrace() const { in getBodyRBrace()
969 bool Decl::AccessDeclContextCheck() const { in AccessDeclContextCheck()
1000 bool Decl::isInExportDeclContext() const { in isInExportDeclContext()
1009 static Decl::Kind getKind(const Decl *D) { return D->getKind(); } in getKind()
1010 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind()
1012 int64_t Decl::getID() const { in getID()
1013 return getASTContext().getAllocator().identifyKnownAlignedObject<Decl>(this); in getID()
1016 const FunctionType *Decl::getFunctionType(bool BlocksToo) const { in getFunctionType()
1037 template <class T> static Decl *getNonClosureContext(T *D) { in getNonClosureContext()
1038 if (getKind(D) == Decl::CXXMethod) { in getNonClosureContext()
1056 Decl *Decl::getNonClosureContext() { in getNonClosureContext()
1060 Decl *DeclContext::getNonClosureAncestor() { in getNonClosureAncestor()
1068 DeclContext::DeclContext(Decl::Kind K) { in DeclContext()
1078 bool DeclContext::classof(const Decl *D) { in classof()
1081 #define DECL_CONTEXT(NAME) case Decl::NAME: in classof()
1088 if (D->getKind() >= Decl::first##NAME && \ in classof()
1089 D->getKind() <= Decl::last##NAME) \ in classof()
1176 if (cast<Decl>(this)->getFriendObjectKind()) in isDependentContext()
1188 if (getDeclKind() == Decl::Enum) in isTransparentContext()
1191 return getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export; in isTransparentContext()
1196 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1197 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1210 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1211 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1245 case Decl::ExternCContext: in getPrimaryContext()
1246 case Decl::LinkageSpec: in getPrimaryContext()
1247 case Decl::Export: in getPrimaryContext()
1248 case Decl::Block: in getPrimaryContext()
1249 case Decl::Captured: in getPrimaryContext()
1250 case Decl::OMPDeclareReduction: in getPrimaryContext()
1251 case Decl::OMPDeclareMapper: in getPrimaryContext()
1252 case Decl::RequiresExprBody: in getPrimaryContext()
1256 case Decl::TranslationUnit: in getPrimaryContext()
1258 case Decl::Namespace: in getPrimaryContext()
1262 case Decl::ObjCMethod: in getPrimaryContext()
1265 case Decl::ObjCInterface: in getPrimaryContext()
1271 case Decl::ObjCProtocol: in getPrimaryContext()
1277 case Decl::ObjCCategory: in getPrimaryContext()
1280 case Decl::ObjCImplementation: in getPrimaryContext()
1281 case Decl::ObjCCategoryImpl: in getPrimaryContext()
1285 if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) { in getPrimaryContext()
1305 assert(getDeclKind() >= Decl::firstFunction && in getPrimaryContext()
1306 getDeclKind() <= Decl::lastFunction && in getPrimaryContext()
1323 Decl::Kind Kind = getDeclKind(); in collectAllContexts()
1325 if (Kind == Decl::TranslationUnit) in collectAllContexts()
1327 else if (Kind == Decl::Namespace) in collectAllContexts()
1333 std::pair<Decl *, Decl *>
1334 DeclContext::BuildDeclChain(ArrayRef<Decl *> Decls, in BuildDeclChain()
1337 Decl *FirstNewDecl = nullptr; in BuildDeclChain()
1338 Decl *PrevDecl = nullptr; in BuildDeclChain()
1377 SmallVector<Decl*, 64> Decls; in LoadLexicalDeclsFromExternalStorage()
1392 Decl *ExternalFirst, *ExternalLast; in LoadLexicalDeclsFromExternalStorage()
1446 bool DeclContext::containsDecl(Decl *D) const { in containsDecl()
1451 bool DeclContext::containsDeclAndLoad(Decl *D) const { in containsDeclAndLoad()
1496 void DeclContext::removeDecl(Decl *D) { in removeDecl()
1509 for (Decl *I = FirstDecl; true; I = I->NextInContextAndBits.getPointer()) { in removeDecl()
1551 void DeclContext::addHiddenDecl(Decl *D) { in addHiddenDecl()
1577 void DeclContext::addDecl(Decl *D) { in addDecl()
1585 void DeclContext::addDeclInternal(Decl *D) { in addDeclInternal()
1665 if (getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export) in lookup()
1677 (void)cast<Decl>(this)->getMostRecentDecl(); in lookup()
1729 assert(getDeclKind() != Decl::LinkageSpec && in noload_lookup()
1730 getDeclKind() != Decl::Export && in noload_lookup()
1791 for (Decl *D = FirstDecl; D; D = D->getNextDeclInContext()) { in localUncachedLookup()
1806 bool SkipRecords = getDeclKind() == Decl::Kind::Enum && in getRedeclContext()
1903 auto *DCAsDecl = cast<Decl>(this); in makeDeclVisibleInContextWithFlags()