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(uint64_t) >= alignof(Decl), "Decl won't be misaligned"); in operator new()
92 void *Decl::operator new(std::size_t Size, const ASTContext &Ctx, in operator new()
102 llvm::offsetToAlignment(sizeof(Module *), llvm::Align(alignof(Decl))); in operator new()
107 Parent ? cast<Decl>(Parent)->getOwningModule() : nullptr; in operator new()
113 GlobalDeclID Decl::getGlobalID() const { in getGlobalID()
121 unsigned Decl::getOwningModuleID() const { in getOwningModuleID()
129 void Decl::setOwningModuleID(unsigned ID) { in setOwningModuleID()
136 Module *Decl::getOwningModuleSlow() const { in getOwningModuleSlow()
141 bool Decl::hasLocalOwningModuleStorage() const { in hasLocalOwningModuleStorage()
145 const char *Decl::getDeclKindName() const { in getDeclKindName()
154 void Decl::setInvalidDecl(bool Invalid) { in setInvalidDecl()
179 #define DECL(DERIVED, BASE) case Decl::DERIVED: return true; in hasValidDeclKind()
188 #define DECL(DERIVED, BASE) case Decl::DERIVED: return #DERIVED; in getDeclKindName()
195 bool Decl::StatisticsEnabled = false;
196 void Decl::EnableStatistics() { in EnableStatistics()
200 void Decl::PrintStats() { in PrintStats()
212 totalBytes += (int)(n##DERIVED##s * sizeof(DERIVED##Decl)); \ in PrintStats()
214 << sizeof(DERIVED##Decl) << " each (" \ in PrintStats()
215 << n##DERIVED##s * sizeof(DERIVED##Decl) \ in PrintStats()
224 void Decl::add(Kind k) { in add()
232 bool Decl::isTemplateParameterPack() const { in isTemplateParameterPack()
242 bool Decl::isParameterPack() const { in isParameterPack()
249 FunctionDecl *Decl::getAsFunction() { in getAsFunction()
257 bool Decl::isTemplateDecl() const { in isTemplateDecl()
261 TemplateDecl *Decl::getDescribedTemplate() const { in getDescribedTemplate()
274 const TemplateParameterList *Decl::getDescribedTemplateParams() const { in getDescribedTemplateParams()
284 bool Decl::isTemplated() const { in isTemplated()
296 unsigned Decl::getTemplateDepth() const { in getTemplateDepth()
309 if (Decl *Context = RD->getLambdaContextDecl()) in getTemplateDepth()
314 return cast<Decl>(DC)->getTemplateDepth(); in getTemplateDepth()
317 const DeclContext *Decl::getParentFunctionOrMethod(bool LexicalParent) const { in getParentFunctionOrMethod()
356 Decl::~Decl() = default;
358 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext()
362 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext()
377 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
386 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC, in setDeclContextsImpl()
391 auto *MDC = new (Ctx) Decl::MultipleDC(); in setDeclContextsImpl()
398 bool Decl::isInLocalScopeForInstantiation() const { in isInLocalScopeForInstantiation()
415 bool Decl::isInAnonymousNamespace() const { in isInAnonymousNamespace()
425 bool Decl::isInStdNamespace() const { in isInStdNamespace()
430 bool Decl::isFileContextDecl() const { in isFileContextDecl()
435 bool Decl::isFlexibleArrayMemberLike( in isFlexibleArrayMemberLike()
436 ASTContext &Ctx, const Decl *D, QualType Ty, in isFlexibleArrayMemberLike()
508 TranslationUnitDecl *Decl::getTranslationUnitDecl() { in getTranslationUnitDecl()
523 ASTContext &Decl::getASTContext() const { in getASTContext()
529 const LangOptions &Decl::getLangOpts() const { in getLangOpts()
533 ASTMutationListener *Decl::getASTMutationListener() const { in getASTMutationListener()
537 unsigned Decl::getMaxAlignment() const { in getMaxAlignment()
552 bool Decl::isUsed(bool CheckUsedAttr) const { in isUsed()
553 const Decl *CanonD = getCanonicalDecl(); in isUsed()
567 void Decl::markUsed(ASTContext &C) { in markUsed()
577 bool Decl::isReferenced() const { in isReferenced()
589 ExternalSourceSymbolAttr *Decl::getExternalSourceSymbolAttr() const { in getExternalSourceSymbolAttr()
590 const Decl *Definition = nullptr; in getExternalSourceSymbolAttr()
603 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) { in getExternalSourceSymbolAttr()
610 bool Decl::hasDefiningAttr() const { in hasDefiningAttr()
615 const Attr *Decl::getDefiningAttr() const { in getDefiningAttr()
748 AvailabilityResult Decl::getAvailability(std::string *Message, in getAvailability()
800 VersionTuple Decl::getVersionIntroduced() const { in getVersionIntroduced()
814 bool Decl::canBeWeakImported(bool &IsDefinition) const { in canBeWeakImported()
843 bool Decl::isWeakImported() const { in isWeakImported()
862 unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { in getIdentifierNamespaceForKind()
997 void Decl::setAttrsImpl(const AttrVec &attrs, ASTContext &Ctx) { in setAttrsImpl()
1007 void Decl::dropAttrs() { in dropAttrs()
1014 void Decl::addAttr(Attr *A) { in addAttr()
1037 const AttrVec &Decl::getAttrs() const { in getAttrs()
1042 Decl *Decl::castFromDeclContext (const DeclContext *D) { in castFromDeclContext()
1043 Decl::Kind DK = D->getDeclKind(); in castFromDeclContext()
1047 case Decl::NAME: \ in castFromDeclContext()
1048 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D)); in castFromDeclContext()
1055 DeclContext *Decl::castToDeclContext(const Decl *D) { in castToDeclContext()
1056 Decl::Kind DK = D->getKind(); in castToDeclContext()
1060 case Decl::NAME: \ in castToDeclContext()
1061 return static_cast<NAME##Decl *>(const_cast<Decl *>(D)); in castToDeclContext()
1068 SourceLocation Decl::getBodyRBrace() const { in getBodyRBrace()
1084 bool Decl::AccessDeclContextCheck() const { in AccessDeclContextCheck()
1113 bool Decl::isInExportDeclContext() const { in isInExportDeclContext()
1122 bool Decl::isInAnotherModuleUnit() const { in isInAnotherModuleUnit()
1143 bool Decl::isInCurrentModuleUnit() const { in isInCurrentModuleUnit()
1152 bool Decl::shouldEmitInExternalSource() const { in shouldEmitInExternalSource()
1160 bool Decl::isFromExplicitGlobalModule() const { in isFromExplicitGlobalModule()
1164 bool Decl::isFromGlobalModule() const { in isFromGlobalModule()
1168 bool Decl::isInNamedModule() const { in isInNamedModule()
1172 static Decl::Kind getKind(const Decl *D) { return D->getKind(); } in getKind()
1173 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind()
1175 int64_t Decl::getID() const { in getID()
1176 return getASTContext().getAllocator().identifyKnownAlignedObject<Decl>(this); in getID()
1179 const FunctionType *Decl::getFunctionType(bool BlocksToo) const { in getFunctionType()
1200 bool Decl::isFunctionPointerType() const { in isFunctionPointerType()
1212 DeclContext *Decl::getNonTransparentDeclContext() { in getNonTransparentDeclContext()
1219 template <class T> static Decl *getNonClosureContext(T *D) { in getNonClosureContext()
1220 if (getKind(D) == Decl::CXXMethod) { in getNonClosureContext()
1238 Decl *Decl::getNonClosureContext() { in getNonClosureContext()
1242 Decl *DeclContext::getNonClosureAncestor() { in getNonClosureAncestor()
1250 DeclContext::DeclContext(Decl::Kind K) { in DeclContext()
1260 bool DeclContext::classof(const Decl *D) { in classof()
1261 Decl::Kind DK = D->getKind(); in classof()
1264 #define DECL_CONTEXT(NAME) case Decl::NAME: in classof()
1352 if (cast<Decl>(this)->getFriendObjectKind()) in isDependentContext()
1364 if (getDeclKind() == Decl::Enum) in isTransparentContext()
1372 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1373 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1386 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1387 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1421 case Decl::ExternCContext: in getPrimaryContext()
1422 case Decl::LinkageSpec: in getPrimaryContext()
1423 case Decl::Export: in getPrimaryContext()
1424 case Decl::TopLevelStmt: in getPrimaryContext()
1425 case Decl::Block: in getPrimaryContext()
1426 case Decl::Captured: in getPrimaryContext()
1427 case Decl::OMPDeclareReduction: in getPrimaryContext()
1428 case Decl::OMPDeclareMapper: in getPrimaryContext()
1429 case Decl::RequiresExprBody: in getPrimaryContext()
1433 case Decl::HLSLBuffer: in getPrimaryContext()
1442 case Decl::TranslationUnit: in getPrimaryContext()
1444 case Decl::Namespace: in getPrimaryContext()
1447 case Decl::ObjCMethod: in getPrimaryContext()
1450 case Decl::ObjCInterface: in getPrimaryContext()
1456 case Decl::ObjCProtocol: in getPrimaryContext()
1462 case Decl::ObjCCategory: in getPrimaryContext()
1465 case Decl::ObjCImplementation: in getPrimaryContext()
1466 case Decl::ObjCCategoryImpl: in getPrimaryContext()
1470 if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) { in getPrimaryContext()
1490 assert(getDeclKind() >= Decl::firstFunction && in getPrimaryContext()
1491 getDeclKind() <= Decl::lastFunction && in getPrimaryContext()
1508 Decl::Kind Kind = getDeclKind(); in collectAllContexts()
1510 if (Kind == Decl::TranslationUnit) in collectAllContexts()
1512 else if (Kind == Decl::Namespace) in collectAllContexts()
1518 std::pair<Decl *, Decl *>
1519 DeclContext::BuildDeclChain(ArrayRef<Decl *> Decls, in BuildDeclChain()
1522 Decl *FirstNewDecl = nullptr; in BuildDeclChain()
1523 Decl *PrevDecl = nullptr; in BuildDeclChain()
1562 SmallVector<Decl*, 64> Decls; in LoadLexicalDeclsFromExternalStorage()
1577 Decl *ExternalFirst, *ExternalLast; in LoadLexicalDeclsFromExternalStorage()
1631 bool DeclContext::containsDecl(Decl *D) const { in containsDecl()
1636 bool DeclContext::containsDeclAndLoad(Decl *D) const { in containsDeclAndLoad()
1681 void DeclContext::removeDecl(Decl *D) { in removeDecl()
1694 for (Decl *I = FirstDecl; true; I = I->NextInContextAndBits.getPointer()) { in removeDecl()
1736 void DeclContext::addHiddenDecl(Decl *D) { in addHiddenDecl()
1762 void DeclContext::addDecl(Decl *D) { in addDecl()
1770 void DeclContext::addDeclInternal(Decl *D) { in addDeclInternal()
1850 if (getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export) in lookup()
1862 (void)cast<Decl>(this)->getMostRecentDecl(); in lookup()
1915 if (getDeclKind() == Decl::LinkageSpec || getDeclKind() == Decl::Export) in noload_lookup()
1977 for (Decl *D = FirstDecl; D; D = D->getNextDeclInContext()) { in localUncachedLookup()
1992 bool SkipRecords = getDeclKind() == Decl::Kind::Enum && in getRedeclContext()
2089 auto *DCAsDecl = cast<Decl>(this); in makeDeclVisibleInContextWithFlags()