Lines Matching refs:DC
304 const DeclContext *DC = D->getDeclContext(); in getOutermostFuncOrBlockContext() local
305 while (DC->getDeclKind() != Decl::TranslationUnit) { in getOutermostFuncOrBlockContext()
306 if (isa<FunctionDecl>(DC) || isa<BlockDecl>(DC)) in getOutermostFuncOrBlockContext()
307 Ret = cast<Decl>(DC); in getOutermostFuncOrBlockContext()
308 DC = DC->getParent(); in getOutermostFuncOrBlockContext()
717 for (const DeclContext *DC = D->getDeclContext(); in getLVForNamespaceScopeDecl() local
718 !isa<TranslationUnitDecl>(DC); in getLVForNamespaceScopeDecl()
719 DC = DC->getParent()) { in getLVForNamespaceScopeDecl()
720 const auto *ND = dyn_cast<NamespaceDecl>(DC); in getLVForNamespaceScopeDecl()
1096 const DeclContext *DC = getDeclContext()->getRedeclContext(); in isReserved() local
1097 if (!DC->isTranslationUnit()) in isReserved()
1213 LinkageInfo LinkageComputer::getLVForClosure(const DeclContext *DC, in getLVForClosure() argument
1219 Owner = dyn_cast<NamedDecl>(DC); in getLVForClosure()
1651 const DeclContext *DC = Contexts[I - 1]; in printNestedNameSpecifier() local
1652 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) { in printNestedNameSpecifier()
1658 } else if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) { in printNestedNameSpecifier()
1665 } else if (const auto *RD = dyn_cast<RecordDecl>(DC)) { in printNestedNameSpecifier()
1670 } else if (const auto *FD = dyn_cast<FunctionDecl>(DC)) { in printNestedNameSpecifier()
1691 } else if (const auto *ED = dyn_cast<EnumDecl>(DC)) { in printNestedNameSpecifier()
1704 OS << *cast<NamedDecl>(DC); in printNestedNameSpecifier()
2000 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC, in VarDecl() argument
2004 : DeclaratorDecl(DK, DC, IdLoc, Id, T, TInfo, StartLoc), in VarDecl()
2017 VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
2021 return new (C, DC) VarDecl(Var, C, DC, StartL, IdL, Id, T, TInfo, S); in Create()
2084 const DeclContext *DC = D.getDeclContext(); in getDeclLanguageLinkage() local
2085 if (DC->isRecord()) in getDeclLanguageLinkage()
2100 const DeclContext *DC = D.getDeclContext(); in isDeclExternC() local
2101 if (DC->isRecord()) { in isDeclExternC()
2725 ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
2730 return new (C, DC) ParmVarDecl(ParmVar, C, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
2843 FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, in FunctionDecl() argument
2850 : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo, in FunctionDecl()
3209 for (const DeclContext *DC = getDeclContext(); in isGlobal() local
3210 DC->isNamespace(); in isGlobal()
3211 DC = DC->getParent()) { in isGlobal()
3212 if (const auto *Namespace = cast<NamespaceDecl>(DC)) { in isGlobal()
4137 FieldDecl *FieldDecl::Create(const ASTContext &C, DeclContext *DC, in Create() argument
4142 return new (C, DC) FieldDecl(Decl::Field, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
4248 TagDecl::TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, in TagDecl() argument
4251 : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), redeclarable_base(C), in TagDecl()
4366 EnumDecl::EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in EnumDecl() argument
4369 : TagDecl(Enum, TTK_Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4383 EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4388 auto *Enum = new (C, DC) EnumDecl(C, DC, StartLoc, IdLoc, Id, PrevDecl, in Create()
4498 DeclContext *DC, SourceLocation StartLoc, in RecordDecl() argument
4501 : TagDecl(DK, TK, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in RecordDecl()
4518 RecordDecl *RecordDecl::Create(const ASTContext &C, TagKind TK, DeclContext *DC, in Create() argument
4521 RecordDecl *R = new (C, DC) RecordDecl(Record, TK, C, DC, in Create()
4681 BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc) in BlockDecl() argument
4682 : Decl(Block, DC, CaretLoc), DeclContext(Block) { in BlockDecl()
4741 TranslationUnitDecl *DC, in Create() argument
4746 new (C, DC, additionalSizeToAlloc<char>(Arg.size() + 1)) in Create()
4747 PragmaCommentDecl(DC, CommentLoc, CommentKind); in Create()
4763 PragmaDetectMismatchDecl::Create(const ASTContext &C, TranslationUnitDecl *DC, in Create() argument
4768 new (C, DC, additionalSizeToAlloc<char>(ValueStart + Value.size() + 1)) in Create()
4769 PragmaDetectMismatchDecl(DC, Loc, ValueStart); in Create()
4788 TranslationUnitDecl *DC) { in Create() argument
4789 return new (C, DC) ExternCContextDecl(DC); in Create()
4794 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4796 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, IdentL); in Create()
4799 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4803 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, GnuLabelL); in Create()
4828 ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4832 return new (C, DC) ImplicitParamDecl(C, DC, IdLoc, Id, Type, ParamKind); in Create()
4845 FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4854 new (C, DC) FunctionDecl(Function, C, DC, StartLoc, NameInfo, T, TInfo, in Create()
4867 BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
4868 return new (C, DC) BlockDecl(DC, L); in Create()
4875 CapturedDecl::CapturedDecl(DeclContext *DC, unsigned NumParams) in CapturedDecl() argument
4876 : Decl(Captured, DC, SourceLocation()), DeclContext(Captured), in CapturedDecl()
4879 CapturedDecl *CapturedDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4881 return new (C, DC, additionalSizeToAlloc<ImplicitParamDecl *>(NumParams)) in Create()
4882 CapturedDecl(DC, NumParams); in Create()
4912 IndirectFieldDecl::IndirectFieldDecl(ASTContext &C, DeclContext *DC, in IndirectFieldDecl() argument
4916 : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH.data()), in IndirectFieldDecl()
4925 IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, in Create() argument
4928 return new (C, DC) IndirectFieldDecl(C, DC, L, Id, T, CH); in Create()
4946 TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4949 return new (C, DC) TypedefDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
4996 TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5000 return new (C, DC) TypeAliasDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5026 FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5030 return new (C, DC) FileScopeAsmDecl(DC, Str, AsmLoc, RParenLoc); in Create()
5041 EmptyDecl *EmptyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5042 return new (C, DC) EmptyDecl(DC, L); in Create()
5064 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5067 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5075 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5077 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5082 ImportDecl *ImportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5085 return new (C, DC, in Create()
5087 ImportDecl(DC, StartLoc, Imported, IdentifierLocs); in Create()
5090 ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC, in CreateImplicit() argument
5094 ImportDecl *Import = new (C, DC, additionalSizeToAlloc<SourceLocation>(1)) in CreateImplicit()
5095 ImportDecl(DC, StartLoc, Imported, EndLoc); in CreateImplicit()
5128 ExportDecl *ExportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5130 return new (C, DC) ExportDecl(DC, ExportLoc); in Create()