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 = getDeclContext(); in getParentFunctionOrMethod() local
288 DC && !DC->isTranslationUnit() && !DC->isNamespace(); in getParentFunctionOrMethod()
289 DC = DC->getParent()) in getParentFunctionOrMethod()
290 if (DC->isFunctionOrMethod()) in getParentFunctionOrMethod()
291 return DC; in getParentFunctionOrMethod()
327 void Decl::setDeclContext(DeclContext *DC) { in setDeclContext() argument
328 DeclCtx = DC; in setDeclContext()
331 void Decl::setLexicalDeclContext(DeclContext *DC) { in setLexicalDeclContext() argument
332 if (DC == getLexicalDeclContext()) in setLexicalDeclContext()
336 setDeclContextsImpl(getDeclContext(), DC, getASTContext()); in setLexicalDeclContext()
338 getMultipleDC()->LexicalDC = DC; in setLexicalDeclContext()
344 setModuleOwnershipKind(getModuleOwnershipKindForChildOf(DC)); in setLexicalDeclContext()
346 setLocalOwningModule(cast<Decl>(DC)->getOwningModule()); in setLexicalDeclContext()
385 for (const DeclContext *DC = getDeclContext(); DC; DC = DC->getParent()) { in isInAnonymousNamespace() local
386 if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) in isInAnonymousNamespace()
395 const DeclContext *DC = getDeclContext(); in isInStdNamespace() local
396 return DC && DC->isStdNamespace(); in isInStdNamespace()
403 DeclContext *DC = getDeclContext(); in getTranslationUnitDecl() local
404 assert(DC && "This decl is not contained in a translation unit!"); in getTranslationUnitDecl()
406 while (!DC->isTranslationUnit()) { in getTranslationUnitDecl()
407 DC = DC->getParent(); in getTranslationUnitDecl()
408 assert(DC && "This decl is not contained in a translation unit!"); in getTranslationUnitDecl()
411 return cast<TranslationUnitDecl>(DC); in getTranslationUnitDecl()
995 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); } in getKind() argument
1177 static bool isLinkageSpecContext(const DeclContext *DC, in isLinkageSpecContext() argument
1179 while (DC->getDeclKind() != Decl::TranslationUnit) { in isLinkageSpecContext()
1180 if (DC->getDeclKind() == Decl::LinkageSpec) in isLinkageSpecContext()
1181 return cast<LinkageSpecDecl>(DC)->getLanguage() == ID; in isLinkageSpecContext()
1182 DC = DC->getLexicalParent(); in isLinkageSpecContext()
1192 const DeclContext *DC = this; in getExternCContext() local
1193 while (DC->getDeclKind() != Decl::TranslationUnit) { in getExternCContext()
1194 if (DC->getDeclKind() == Decl::LinkageSpec && in getExternCContext()
1195 cast<LinkageSpecDecl>(DC)->getLanguage() == LinkageSpecDecl::lang_c) in getExternCContext()
1196 return cast<LinkageSpecDecl>(DC); in getExternCContext()
1197 DC = DC->getLexicalParent(); in getExternCContext()
1206 bool DeclContext::Encloses(const DeclContext *DC) const { in Encloses()
1208 return getPrimaryContext()->Encloses(DC); in Encloses()
1210 for (; DC; DC = DC->getParent()) in Encloses()
1211 if (DC->getPrimaryContext() == this) in Encloses()
1371 ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC, in SetNoExternalVisibleDeclsForName() argument
1373 ASTContext &Context = DC->getParentASTContext(); in SetNoExternalVisibleDeclsForName()
1375 if (!(Map = DC->LookupPtr)) in SetNoExternalVisibleDeclsForName()
1376 Map = DC->CreateStoredDeclsMap(Context); in SetNoExternalVisibleDeclsForName()
1377 if (DC->hasNeedToReconcileExternalVisibleStorage()) in SetNoExternalVisibleDeclsForName()
1378 DC->reconcileExternalVisibleStorage(); in SetNoExternalVisibleDeclsForName()
1386 ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC, in SetExternalVisibleDeclsForName() argument
1389 ASTContext &Context = DC->getParentASTContext(); in SetExternalVisibleDeclsForName()
1391 if (!(Map = DC->LookupPtr)) in SetExternalVisibleDeclsForName()
1392 Map = DC->CreateStoredDeclsMap(Context); in SetExternalVisibleDeclsForName()
1393 if (DC->hasNeedToReconcileExternalVisibleStorage()) in SetExternalVisibleDeclsForName()
1394 DC->reconcileExternalVisibleStorage(); in SetExternalVisibleDeclsForName()
1503 auto *DC = D->getDeclContext(); in removeDecl() local
1505 StoredDeclsMap *Map = DC->getPrimaryContext()->LookupPtr; in removeDecl()
1511 } while (DC->isTransparentContext() && (DC = DC->getParent())); in removeDecl()
1576 for (auto *DC : Contexts) { in buildLookup() local
1577 if (DC->hasExternalLexicalStorage()) { in buildLookup()
1578 bool LoadedDecls = DC->LoadLexicalDeclsFromExternalStorage(); in buildLookup()
1588 for (auto *DC : Contexts) in buildLookup() local
1589 buildLookupImpl(DC, hasExternalVisibleStorage()); in buildLookup()
1791 DeclContext *DC = this; in getOuterLexicalRecordContext() local
1792 while (DC->isRecord()) { in getOuterLexicalRecordContext()
1793 OutermostRD = cast<RecordDecl>(DC); in getOuterLexicalRecordContext()
1794 DC = DC->getLexicalParent(); in getOuterLexicalRecordContext()