• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/clang/lib/AST/

Lines Matching refs:DeclContext

9 // This file implements the Decl and DeclContext classes.
94 DeclContext *Parent, std::size_t Extra) {
155 const char *DeclContext::getDeclKindName() const {
258 if (auto *AsDC = dyn_cast<DeclContext>(this))
266 if (auto *DC = dyn_cast<DeclContext>(this))
274 // template. In this case, the next step is not the parent DeclContext (or
275 // even a DeclContext at all).
281 const DeclContext *DC =
286 const DeclContext *Decl::getParentFunctionOrMethod() const {
287 for (const DeclContext *DC = getDeclContext();
327 void Decl::setDeclContext(DeclContext *DC) {
331 void Decl::setLexicalDeclContext(DeclContext *DC) {
355 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
368 const DeclContext *LDC = getLexicalDeclContext();
385 for (const DeclContext *DC = getDeclContext(); DC; DC = DC->getParent()) {
395 const DeclContext *DC = getDeclContext();
403 DeclContext *DC = getDeclContext();
909 Decl *Decl::castFromDeclContext (const DeclContext *D) {
915 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D));
922 return static_cast<NAME##Decl *>(const_cast<DeclContext *>(D));
924 llvm_unreachable("a decl that inherits DeclContext isn't handled");
928 DeclContext *Decl::castToDeclContext(const Decl *D) {
943 llvm_unreachable("a decl that inherits DeclContext isn't handled");
982 // as DeclContext (?).
997 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); }
1022 /// Starting at a given context (a Decl or DeclContext), look for a
1047 Decl *DeclContext::getNonClosureAncestor() {
1052 // DeclContext Implementation
1055 DeclContext::DeclContext(Decl::Kind K) {
1065 bool DeclContext::classof(const Decl *D) {
1083 DeclContext::~DeclContext() = default;
1091 DeclContext *DeclContext::getLookupParent() {
1107 const BlockDecl *DeclContext::getInnermostBlockDecl() const {
1108 const DeclContext *Ctx = this;
1119 bool DeclContext::isInlineNamespace() const {
1124 bool DeclContext::isStdNamespace() const {
1140 bool DeclContext::isDependentContext() const {
1166 // DeclContext. A context within it (such as a lambda-expression)
1172 bool DeclContext::isTransparentContext() const {
1181 static bool isLinkageSpecContext(const DeclContext *DC,
1191 bool DeclContext::isExternCContext() const {
1195 const LinkageSpecDecl *DeclContext::getExternCContext() const {
1196 const DeclContext *DC = this;
1206 bool DeclContext::isExternCXXContext() const {
1210 bool DeclContext::Encloses(const DeclContext *DC) const {
1220 DeclContext *DeclContext::getPrimaryContext() {
1231 // There is only one DeclContext for these entities.
1283 "Unknown DeclContext kind");
1289 DeclContext::collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts){
1306 DeclContext::BuildDeclChain(ArrayRef<Decl *> Decls,
1329 void DeclContext::reconcileExternalVisibleStorage() const {
1341 DeclContext::LoadLexicalDeclsFromExternalStorage() const {
1345 // Notify that we have a DeclContext that is initializing.
1374 DeclContext::lookup_result
1375 ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC,
1386 return DeclContext::lookup_result();
1389 DeclContext::lookup_result
1390 ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC,
1437 DeclContext::decl_iterator DeclContext::decls_begin() const {
1443 bool DeclContext::decls_empty() const {
1450 bool DeclContext::containsDecl(Decl *D) const {
1455 bool DeclContext::containsDeclAndLoad(Decl *D) const {
1500 void DeclContext::removeDecl(Decl *D) {
1554 void DeclContext::addHiddenDecl(Decl *D) {
1558 "Decl already inserted into a DeclContext");
1580 void DeclContext::addDecl(Decl *D) {
1588 void DeclContext::addDeclInternal(Decl *D) {
1597 /// declarations in this DeclContext (and any other contexts linked
1603 StoredDeclsMap *DeclContext::buildLookup() {
1610 SmallVector<DeclContext *, 2> Contexts;
1637 /// DeclContext, a DeclContext linked to it, or a transparent context
1639 void DeclContext::buildLookupImpl(DeclContext *DCtx, bool Internal) {
1659 if (auto *InnerCtx = dyn_cast<DeclContext>(D))
1667 DeclContext::lookup_result
1668 DeclContext::lookup(DeclarationName Name) const {
1673 const DeclContext *PrimaryContext = getPrimaryContext();
1695 Map = const_cast<DeclContext*>(this)->buildLookup();
1720 Map = const_cast<DeclContext*>(this)->buildLookup();
1732 DeclContext::lookup_result
1733 DeclContext::noload_lookup(DeclarationName Name) {
1738 DeclContext *PrimaryContext = getPrimaryContext();
1755 void DeclContext::loadLazyLocalLexicalLookups() {
1757 SmallVector<DeclContext *, 2> Contexts;
1765 void DeclContext::localUncachedLookup(DeclarationName Name,
1803 DeclContext *DeclContext::getRedeclContext() {
1804 DeclContext *Ctx = this;
1821 DeclContext *DeclContext::getEnclosingNamespaceContext() {
1822 DeclContext *Ctx = this;
1829 RecordDecl *DeclContext::getOuterLexicalRecordContext() {
1832 DeclContext *DC = this;
1840 bool DeclContext::InEnclosingNamespaceSetOf(const DeclContext *O) const {
1858 void DeclContext::makeDeclVisibleInContext(NamedDecl *D) {
1859 DeclContext *PrimaryDC = this->getPrimaryContext();
1860 DeclContext *DeclDC = D->getDeclContext()->getPrimaryContext();
1866 void DeclContext::makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal,
1915 void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal) {
1961 UsingDirectiveDecl *DeclContext::udir_iterator::operator*() const {
1967 DeclContext::udir_range DeclContext::using_directives() const {
1978 StoredDeclsMap *DeclContext::CreateStoredDeclsMap(ASTContext &C) const {
2018 DeclContext *Parent,