Lines Matching refs:DC

268   auto *DC = getFriendObjectKind() || isLocalExternDecl()  in isTemplated()  local
270 return DC->isDependentContext() || isTemplateDecl() || in isTemplated()
275 if (auto *DC = dyn_cast<DeclContext>(this)) in getTemplateDepth() local
276 if (DC->isFileContext()) in getTemplateDepth()
290 const DeclContext *DC = in getTemplateDepth() local
292 return cast<Decl>(DC)->getTemplateDepth(); in getTemplateDepth()
296 for (const DeclContext *DC = LexicalParent ? getLexicalDeclContext() in getParentFunctionOrMethod() local
298 DC && !DC->isFileContext(); DC = DC->getParent()) in getParentFunctionOrMethod()
299 if (DC->isFunctionOrMethod()) in getParentFunctionOrMethod()
300 return DC; in getParentFunctionOrMethod()
336 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext() argument
337 DeclCtx = DC; in setDeclContext()
340 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext() argument
341 if (DC == getLexicalDeclContext()) in setLexicalDeclContext()
345 setDeclContextsImpl(getDeclContext(), DC, getASTContext()); in setLexicalDeclContext()
347 getMultipleDC()->LexicalDC = DC; in setLexicalDeclContext()
353 setModuleOwnershipKind(getModuleOwnershipKindForChildOf(DC)); in setLexicalDeclContext()
355 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
394 for (const DeclContext *DC = getDeclContext(); DC; DC = DC->getParent()) { in isInAnonymousNamespace() local
395 if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) in isInAnonymousNamespace()
404 const DeclContext *DC = getDeclContext(); in isInStdNamespace() local
405 return DC && DC->isStdNamespace(); in isInStdNamespace()
409 const auto *DC = dyn_cast<DeclContext>(this); in isFileContextDecl() local
410 return DC && DC->isFileContext(); in isFileContextDecl()
490 DeclContext *DC = getDeclContext(); in getTranslationUnitDecl() local
491 assert(DC && "This decl is not contained in a translation unit!"); in getTranslationUnitDecl()
493 while (!DC->isTranslationUnit()) { in getTranslationUnitDecl()
494 DC = DC->getParent(); in getTranslationUnitDecl()
495 assert(DC && "This decl is not contained in a translation unit!"); in getTranslationUnitDecl()
498 return cast<TranslationUnitDecl>(DC); in getTranslationUnitDecl()
1075 const DeclContext *DC = getLexicalDeclContext(); in isInExportDeclContext() local
1077 while (DC && !isa<ExportDecl>(DC)) in isInExportDeclContext()
1078 DC = DC->getLexicalParent(); in isInExportDeclContext()
1080 return DC && isa<ExportDecl>(DC); in isInExportDeclContext()
1111 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind() argument
1306 static bool isLinkageSpecContext(const DeclContext *DC, in isLinkageSpecContext() argument
1308 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1309 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1310 return cast<LinkageSpecDecl>(DC)->getLanguage() == ID; in isLinkageSpecContext()
1311 DC = DC->getLexicalParent(); in isLinkageSpecContext()
1321 const DeclContext *DC = this; in getExternCContext() local
1322 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1323 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1324 cast<LinkageSpecDecl>(DC)->getLanguage() == LinkageSpecLanguageIDs::C) in getExternCContext()
1325 return cast<LinkageSpecDecl>(DC); in getExternCContext()
1326 DC = DC->getLexicalParent(); in getExternCContext()
1335 bool DeclContext::Encloses(const DeclContext *DC) const { in Encloses()
1337 return getPrimaryContext()->Encloses(DC); in Encloses()
1339 for (; DC; DC = DC->getParent()) in Encloses()
1340 if (!isa<LinkageSpecDecl>(DC) && !isa<ExportDecl>(DC) && in Encloses()
1341 DC->getPrimaryContext() == this) in Encloses()
1347 DeclContext *DC = this; in getNonTransparentContext() local
1348 while (DC->isTransparentContext()) { in getNonTransparentContext()
1349 DC = DC->getParent(); in getNonTransparentContext()
1350 assert(DC && "All transparent contexts should have a parent!"); in getNonTransparentContext()
1352 return DC; in getNonTransparentContext()
1524 ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC, in SetNoExternalVisibleDeclsForName() argument
1526 ASTContext &Context = DC->getParentASTContext(); in SetNoExternalVisibleDeclsForName()
1528 if (!(Map = DC->LookupPtr)) in SetNoExternalVisibleDeclsForName()
1529 Map = DC->CreateStoredDeclsMap(Context); in SetNoExternalVisibleDeclsForName()
1530 if (DC->hasNeedToReconcileExternalVisibleStorage()) in SetNoExternalVisibleDeclsForName()
1531 DC->reconcileExternalVisibleStorage(); in SetNoExternalVisibleDeclsForName()
1539 ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, in SetExternalVisibleDeclsForName() argument
1542 ASTContext &Context = DC->getParentASTContext(); in SetExternalVisibleDeclsForName()
1544 if (!(Map = DC->LookupPtr)) in SetExternalVisibleDeclsForName()
1545 Map = DC->CreateStoredDeclsMap(Context); in SetExternalVisibleDeclsForName()
1546 if (DC->hasNeedToReconcileExternalVisibleStorage()) in SetExternalVisibleDeclsForName()
1547 DC->reconcileExternalVisibleStorage(); in SetExternalVisibleDeclsForName()
1656 auto *DC = D->getDeclContext(); in removeDecl() local
1658 StoredDeclsMap *Map = DC->getPrimaryContext()->LookupPtr; in removeDecl()
1668 } while (DC->isTransparentContext() && (DC = DC->getParent())); in removeDecl()
1733 for (auto *DC : Contexts) { in buildLookup() local
1734 if (DC->hasExternalLexicalStorage()) { in buildLookup()
1735 bool LoadedDecls = DC->LoadLexicalDeclsFromExternalStorage(); in buildLookup()
1745 for (auto *DC : Contexts) in buildLookup() local
1746 buildLookupImpl(DC, hasExternalVisibleStorage()); in buildLookup()
1949 DeclContext *DC = this; in getOuterLexicalRecordContext() local
1950 while (DC->isRecord()) { in getOuterLexicalRecordContext()
1951 OutermostRD = cast<RecordDecl>(DC); in getOuterLexicalRecordContext()
1952 DC = DC->getLexicalParent(); in getOuterLexicalRecordContext()