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 true; in hasValidDeclKind()
166 #define DECL(DERIVED, BASE) case Decl::DERIVED: return #DERIVED; in getDeclKindName()
173 bool Decl::StatisticsEnabled = false;
174 void Decl::EnableStatistics() { in EnableStatistics()
178 void Decl::PrintStats() { in PrintStats()
190 totalBytes += (int)(n##DERIVED##s * sizeof(DERIVED##Decl)); \ in PrintStats()
192 << sizeof(DERIVED##Decl) << " each (" \ in PrintStats()
193 << n##DERIVED##s * sizeof(DERIVED##Decl) \ in PrintStats()
202 void Decl::add(Kind k) { in add()
210 bool Decl::isTemplateParameterPack() const { in isTemplateParameterPack()
220 bool Decl::isParameterPack() const { in isParameterPack()
227 FunctionDecl *Decl::getAsFunction() { in getAsFunction()
235 bool Decl::isTemplateDecl() const { in isTemplateDecl()
239 TemplateDecl *Decl::getDescribedTemplate() const { in getDescribedTemplate()
252 const TemplateParameterList *Decl::getDescribedTemplateParams() const { in getDescribedTemplateParams()
262 bool Decl::isTemplated() const { in isTemplated()
274 unsigned Decl::getTemplateDepth() const { in getTemplateDepth()
287 if (Decl *Context = RD->getLambdaContextDecl()) in getTemplateDepth()
292 return cast<Decl>(DC)->getTemplateDepth(); in getTemplateDepth()
295 const DeclContext *Decl::getParentFunctionOrMethod(bool LexicalParent) const { in getParentFunctionOrMethod()
334 Decl::~Decl() = default;
336 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext()
340 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext()
355 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
364 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC, in setDeclContextsImpl()
369 auto *MDC = new (Ctx) Decl::MultipleDC(); in setDeclContextsImpl()
376 bool Decl::isInLocalScopeForInstantiation() const { in isInLocalScopeForInstantiation()
393 bool Decl::isInAnonymousNamespace() const { in isInAnonymousNamespace()
403 bool Decl::isInStdNamespace() const { in isInStdNamespace()
408 bool Decl::isFileContextDecl() const { in isFileContextDecl()
413 bool Decl::isFlexibleArrayMemberLike( in isFlexibleArrayMemberLike()
414 ASTContext &Ctx, const Decl *D, QualType Ty, in isFlexibleArrayMemberLike()
486 TranslationUnitDecl *Decl::getTranslationUnitDecl() { in getTranslationUnitDecl()
501 ASTContext &Decl::getASTContext() const { in getASTContext()
507 const LangOptions &Decl::getLangOpts() const { in getLangOpts()
511 ASTMutationListener *Decl::getASTMutationListener() const { in getASTMutationListener()
515 unsigned Decl::getMaxAlignment() const { in getMaxAlignment()
530 bool Decl::isUsed(bool CheckUsedAttr) const { in isUsed()
531 const Decl *CanonD = getCanonicalDecl(); in isUsed()
545 void Decl::markUsed(ASTContext &C) { in markUsed()
555 bool Decl::isReferenced() const { in isReferenced()
567 ExternalSourceSymbolAttr *Decl::getExternalSourceSymbolAttr() const { in getExternalSourceSymbolAttr()
568 const Decl *Definition = nullptr; in getExternalSourceSymbolAttr()
581 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) { in getExternalSourceSymbolAttr()
588 bool Decl::hasDefiningAttr() const { in hasDefiningAttr()
593 const Attr *Decl::getDefiningAttr() const { in getDefiningAttr()
709 AvailabilityResult Decl::getAvailability(std::string *Message, in getAvailability()
761 VersionTuple Decl::getVersionIntroduced() const { in getVersionIntroduced()
775 bool Decl::canBeWeakImported(bool &IsDefinition) const { in canBeWeakImported()
804 bool Decl::isWeakImported() const { in isWeakImported()
823 unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { in getIdentifierNamespaceForKind()
958 void Decl::setAttrsImpl(const AttrVec &attrs, ASTContext &Ctx) { in setAttrsImpl()
968 void Decl::dropAttrs() { in dropAttrs()
975 void Decl::addAttr(Attr *A) { in addAttr()
998 const AttrVec &Decl::getAttrs() const { in getAttrs()
1003 Decl *Decl::castFromDeclContext (const DeclContext *D) { in castFromDeclContext()
1004 Decl::Kind DK = D->getDeclKind(); in castFromDeclContext()
1008 case Decl::NAME: \ in castFromDeclContext()
1009 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
1016 DeclContext *Decl::castToDeclContext(const Decl *D) { in castToDeclContext()
1017 Decl::Kind DK = D->getKind(); in castToDeclContext()
1021 case Decl::NAME: \ in castToDeclContext()
1022 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
1029 SourceLocation Decl::getBodyRBrace() const { in getBodyRBrace()
1045 bool Decl::AccessDeclContextCheck() const { in AccessDeclContextCheck()
1074 bool Decl::isInExportDeclContext() const { in isInExportDeclContext()
1083 bool Decl::isInAnotherModuleUnit() const { in isInAnotherModuleUnit()
1105 bool Decl::shouldSkipCheckingODR() const { in shouldSkipCheckingODR()
1110 static Decl::Kind getKind(const Decl *D) { return D->getKind(); } in getKind()
1111 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind()
1113 int64_t Decl::getID() const { in getID()
1114 return getASTContext().getAllocator().identifyKnownAlignedObject<Decl>(this); in getID()
1117 const FunctionType *Decl::getFunctionType(bool BlocksToo) const { in getFunctionType()
1136 bool Decl::isFunctionPointerType() const { in isFunctionPointerType()
1148 DeclContext *Decl::getNonTransparentDeclContext() { in getNonTransparentDeclContext()
1155 template <class T> static Decl *getNonClosureContext(T *D) { in getNonClosureContext()
1156 if (getKind(D) == Decl::CXXMethod) { in getNonClosureContext()
1174 Decl *Decl::getNonClosureContext() { in getNonClosureContext()
1178 Decl *DeclContext::getNonClosureAncestor() { in getNonClosureAncestor()
1186 DeclContext::DeclContext(Decl::Kind K) { in DeclContext()
1196 bool DeclContext::classof(const Decl *D) { in classof()
1197 Decl::Kind DK = D->getKind(); in classof()
1200 #define DECL_CONTEXT(NAME) case Decl::NAME: in classof()
1288 if (cast<Decl>(this)->getFriendObjectKind()) in isDependentContext()
1300 if (getDeclKind() == Decl::Enum) in isTransparentContext()
1308 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1309 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1322 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1323 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1357 case Decl::ExternCContext: in getPrimaryContext()
1358 case Decl::LinkageSpec: in getPrimaryContext()
1359 case Decl::Export: in getPrimaryContext()
1360 case Decl::Block: in getPrimaryContext()
1361 case Decl::Captured: in getPrimaryContext()
1362 case Decl::OMPDeclareReduction: in getPrimaryContext()
1363 case Decl::OMPDeclareMapper: in getPrimaryContext()
1364 case Decl::RequiresExprBody: in getPrimaryContext()
1368 case Decl::HLSLBuffer: in getPrimaryContext()
1377 case Decl::TranslationUnit: in getPrimaryContext()
1379 case Decl::Namespace: in getPrimaryContext()
1383 case Decl::ObjCMethod: in getPrimaryContext()
1386 case Decl::ObjCInterface: in getPrimaryContext()
1392 case Decl::ObjCProtocol: in getPrimaryContext()
1398 case Decl::ObjCCategory: in getPrimaryContext()
1401 case Decl::ObjCImplementation: in getPrimaryContext()
1402 case Decl::ObjCCategoryImpl: in getPrimaryContext()
1406 if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) { in getPrimaryContext()
1426 assert(getDeclKind() >= Decl::firstFunction && in getPrimaryContext()
1427 getDeclKind() <= Decl::lastFunction && in getPrimaryContext()
1444 Decl::Kind Kind = getDeclKind(); in collectAllContexts()
1446 if (Kind == Decl::TranslationUnit) in collectAllContexts()
1448 else if (Kind == Decl::Namespace) in collectAllContexts()
1454 std::pair<Decl *, Decl *>
1455 DeclContext::BuildDeclChain(ArrayRef<Decl *> Decls, in BuildDeclChain()
1458 Decl *FirstNewDecl = nullptr; in BuildDeclChain()
1459 Decl *PrevDecl = nullptr; in BuildDeclChain()
1498 SmallVector<Decl*, 64> Decls; in LoadLexicalDeclsFromExternalStorage()
1513 Decl *ExternalFirst, *ExternalLast; in LoadLexicalDeclsFromExternalStorage()
1567 bool DeclContext::containsDecl(Decl *D) const { in containsDecl()
1572 bool DeclContext::containsDeclAndLoad(Decl *D) const { in containsDeclAndLoad()
1617 void DeclContext::removeDecl(Decl *D) { in removeDecl()
1630 for (Decl *I = FirstDecl; true; I = I->NextInContextAndBits.getPointer()) { in removeDecl()
1672 void DeclContext::addHiddenDecl(Decl *D) { in addHiddenDecl()
1698 void DeclContext::addDecl(Decl *D) { in addDecl()
1706 void DeclContext::addDeclInternal(Decl *D) { in addDeclInternal()
1786 if (getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export) in lookup()
1798 (void)cast<Decl>(this)->getMostRecentDecl(); in lookup()
1850 assert(getDeclKind() != Decl::LinkageSpec && in noload_lookup()
1851 getDeclKind() != Decl::Export && in noload_lookup()
1913 for (Decl *D = FirstDecl; D; D = D->getNextDeclInContext()) { in localUncachedLookup()
1928 bool SkipRecords = getDeclKind() == Decl::Kind::Enum && in getRedeclContext()
2025 auto *DCAsDecl = cast<Decl>(this); in makeDeclVisibleInContextWithFlags()