Lines Matching refs:DC

260   auto *DC = getFriendObjectKind() ? getLexicalDeclContext() : getDeclContext();  in isTemplated()  local
261 return DC->isDependentContext() || isTemplateDecl() || in isTemplated()
266 if (auto *DC = dyn_cast<DeclContext>(this)) in getTemplateDepth() local
267 if (DC->isFileContext()) in getTemplateDepth()
281 const DeclContext *DC = in getTemplateDepth() local
283 return cast<Decl>(DC)->getTemplateDepth(); in getTemplateDepth()
287 for (const DeclContext *DC = LexicalParent ? getLexicalDeclContext() in getParentFunctionOrMethod() local
289 DC && !DC->isTranslationUnit() && !DC->isNamespace(); in getParentFunctionOrMethod()
290 DC = DC->getParent()) in getParentFunctionOrMethod()
291 if (DC->isFunctionOrMethod()) in getParentFunctionOrMethod()
292 return DC; in getParentFunctionOrMethod()
328 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext() argument
329 DeclCtx = DC; in setDeclContext()
332 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext() argument
333 if (DC == getLexicalDeclContext()) in setLexicalDeclContext()
337 setDeclContextsImpl(getDeclContext(), DC, getASTContext()); in setLexicalDeclContext()
339 getMultipleDC()->LexicalDC = DC; in setLexicalDeclContext()
345 setModuleOwnershipKind(getModuleOwnershipKindForChildOf(DC)); in setLexicalDeclContext()
347 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
386 for (const DeclContext *DC = getDeclContext(); DC; DC = DC->getParent()) { in isInAnonymousNamespace() local
387 if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) in isInAnonymousNamespace()
396 const DeclContext *DC = getDeclContext(); in isInStdNamespace() local
397 return DC && DC->isStdNamespace(); in isInStdNamespace()
404 DeclContext *DC = getDeclContext(); in getTranslationUnitDecl() local
405 assert(DC && "This decl is not contained in a translation unit!"); in getTranslationUnitDecl()
407 while (!DC->isTranslationUnit()) { in getTranslationUnitDecl()
408 DC = DC->getParent(); in getTranslationUnitDecl()
409 assert(DC && "This decl is not contained in a translation unit!"); in getTranslationUnitDecl()
412 return cast<TranslationUnitDecl>(DC); in getTranslationUnitDecl()
1001 const DeclContext *DC = getLexicalDeclContext(); in isInExportDeclContext() local
1003 while (DC && !isa<ExportDecl>(DC)) in isInExportDeclContext()
1004 DC = DC->getLexicalParent(); in isInExportDeclContext()
1006 return DC && isa<ExportDecl>(DC); in isInExportDeclContext()
1010 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind() argument
1194 static bool isLinkageSpecContext(const DeclContext *DC, in isLinkageSpecContext() argument
1196 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1197 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1198 return cast<LinkageSpecDecl>(DC)->getLanguage() == ID; in isLinkageSpecContext()
1199 DC = DC->getLexicalParent(); in isLinkageSpecContext()
1209 const DeclContext *DC = this; in getExternCContext() local
1210 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1211 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1212 cast<LinkageSpecDecl>(DC)->getLanguage() == LinkageSpecDecl::lang_c) in getExternCContext()
1213 return cast<LinkageSpecDecl>(DC); in getExternCContext()
1214 DC = DC->getLexicalParent(); in getExternCContext()
1223 bool DeclContext::Encloses(const DeclContext *DC) const { in Encloses()
1225 return getPrimaryContext()->Encloses(DC); in Encloses()
1227 for (; DC; DC = DC->getParent()) in Encloses()
1228 if (!isa<LinkageSpecDecl>(DC) && !isa<ExportDecl>(DC) && in Encloses()
1229 DC->getPrimaryContext() == this) in Encloses()
1235 DeclContext *DC = this; in getNonTransparentContext() local
1236 while (DC->isTransparentContext()) { in getNonTransparentContext()
1237 DC = DC->getParent(); in getNonTransparentContext()
1238 assert(DC && "All transparent contexts should have a parent!"); in getNonTransparentContext()
1240 return DC; in getNonTransparentContext()
1403 ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC, in SetNoExternalVisibleDeclsForName() argument
1405 ASTContext &Context = DC->getParentASTContext(); in SetNoExternalVisibleDeclsForName()
1407 if (!(Map = DC->LookupPtr)) in SetNoExternalVisibleDeclsForName()
1408 Map = DC->CreateStoredDeclsMap(Context); in SetNoExternalVisibleDeclsForName()
1409 if (DC->hasNeedToReconcileExternalVisibleStorage()) in SetNoExternalVisibleDeclsForName()
1410 DC->reconcileExternalVisibleStorage(); in SetNoExternalVisibleDeclsForName()
1418 ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, in SetExternalVisibleDeclsForName() argument
1421 ASTContext &Context = DC->getParentASTContext(); in SetExternalVisibleDeclsForName()
1423 if (!(Map = DC->LookupPtr)) in SetExternalVisibleDeclsForName()
1424 Map = DC->CreateStoredDeclsMap(Context); in SetExternalVisibleDeclsForName()
1425 if (DC->hasNeedToReconcileExternalVisibleStorage()) in SetExternalVisibleDeclsForName()
1426 DC->reconcileExternalVisibleStorage(); in SetExternalVisibleDeclsForName()
1535 auto *DC = D->getDeclContext(); in removeDecl() local
1537 StoredDeclsMap *Map = DC->getPrimaryContext()->LookupPtr; in removeDecl()
1547 } while (DC->isTransparentContext() && (DC = DC->getParent())); in removeDecl()
1612 for (auto *DC : Contexts) { in buildLookup() local
1613 if (DC->hasExternalLexicalStorage()) { in buildLookup()
1614 bool LoadedDecls = DC->LoadLexicalDeclsFromExternalStorage(); in buildLookup()
1624 for (auto *DC : Contexts) in buildLookup() local
1625 buildLookupImpl(DC, hasExternalVisibleStorage()); in buildLookup()
1827 DeclContext *DC = this; in getOuterLexicalRecordContext() local
1828 while (DC->isRecord()) { in getOuterLexicalRecordContext()
1829 OutermostRD = cast<RecordDecl>(DC); in getOuterLexicalRecordContext()
1830 DC = DC->getLexicalParent(); in getOuterLexicalRecordContext()