Lines Matching refs:DC
306 const DeclContext *DC = D->getDeclContext(); in getOutermostFuncOrBlockContext() local
307 while (DC->getDeclKind() != Decl::TranslationUnit) { in getOutermostFuncOrBlockContext()
308 if (isa<FunctionDecl>(DC) || isa<BlockDecl>(DC)) in getOutermostFuncOrBlockContext()
309 Ret = cast<Decl>(DC); in getOutermostFuncOrBlockContext()
310 DC = DC->getParent(); in getOutermostFuncOrBlockContext()
737 for (const DeclContext *DC = D->getDeclContext(); in getLVForNamespaceScopeDecl() local
738 !isa<TranslationUnitDecl>(DC); in getLVForNamespaceScopeDecl()
739 DC = DC->getParent()) { in getLVForNamespaceScopeDecl()
740 const auto *ND = dyn_cast<NamespaceDecl>(DC); in getLVForNamespaceScopeDecl()
1121 const DeclContext *DC = getDeclContext()->getRedeclContext(); in isReserved() local
1122 if (DC->isTranslationUnit()) in isReserved()
1245 LinkageInfo LinkageComputer::getLVForClosure(const DeclContext *DC, in getLVForClosure() argument
1251 Owner = dyn_cast<NamedDecl>(DC); in getLVForClosure()
1692 for (const DeclContext *DC : llvm::reverse(Contexts)) { in printNestedNameSpecifier() local
1693 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) { in printNestedNameSpecifier()
1699 } else if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) { in printNestedNameSpecifier()
1706 } else if (const auto *RD = dyn_cast<RecordDecl>(DC)) { in printNestedNameSpecifier()
1711 } else if (const auto *FD = dyn_cast<FunctionDecl>(DC)) { in printNestedNameSpecifier()
1732 } else if (const auto *ED = dyn_cast<EnumDecl>(DC)) { in printNestedNameSpecifier()
1745 OS << *cast<NamedDecl>(DC); in printNestedNameSpecifier()
2041 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC, in VarDecl() argument
2045 : DeclaratorDecl(DK, DC, IdLoc, Id, T, TInfo, StartLoc), in VarDecl()
2058 VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartL, in Create() argument
2061 return new (C, DC) VarDecl(Var, C, DC, StartL, IdL, Id, T, TInfo, S); in Create()
2124 const DeclContext *DC = D.getDeclContext(); in getDeclLanguageLinkage() local
2125 if (DC->isRecord()) in getDeclLanguageLinkage()
2140 const DeclContext *DC = D.getDeclContext(); in isDeclExternC() local
2141 if (DC->isRecord()) { in isDeclExternC()
2813 ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
2818 return new (C, DC) ParmVarDecl(ParmVar, C, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
2936 FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, in FunctionDecl() argument
2943 : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo, in FunctionDecl()
3305 for (const DeclContext *DC = getDeclContext(); in isGlobal() local
3306 DC->isNamespace(); in isGlobal()
3307 DC = DC->getParent()) { in isGlobal()
3308 if (const auto *Namespace = cast<NamespaceDecl>(DC)) { in isGlobal()
4256 FieldDecl *FieldDecl::Create(const ASTContext &C, DeclContext *DC, in Create() argument
4261 return new (C, DC) FieldDecl(Decl::Field, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
4367 TagDecl::TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, in TagDecl() argument
4370 : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), redeclarable_base(C), in TagDecl()
4486 EnumDecl::EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in EnumDecl() argument
4489 : TagDecl(Enum, TTK_Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4503 EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4508 auto *Enum = new (C, DC) EnumDecl(C, DC, StartLoc, IdLoc, Id, PrevDecl, in Create()
4629 DeclContext *DC, SourceLocation StartLoc, in RecordDecl() argument
4632 : TagDecl(DK, TK, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in RecordDecl()
4650 RecordDecl *RecordDecl::Create(const ASTContext &C, TagKind TK, DeclContext *DC, in Create() argument
4653 RecordDecl *R = new (C, DC) RecordDecl(Record, TK, C, DC, in Create()
4826 BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc) in BlockDecl() argument
4827 : Decl(Block, DC, CaretLoc), DeclContext(Block) { in BlockDecl()
4886 TranslationUnitDecl *DC, in Create() argument
4891 new (C, DC, additionalSizeToAlloc<char>(Arg.size() + 1)) in Create()
4892 PragmaCommentDecl(DC, CommentLoc, CommentKind); in Create()
4908 PragmaDetectMismatchDecl::Create(const ASTContext &C, TranslationUnitDecl *DC, in Create() argument
4913 new (C, DC, additionalSizeToAlloc<char>(ValueStart + Value.size() + 1)) in Create()
4914 PragmaDetectMismatchDecl(DC, Loc, ValueStart); in Create()
4933 TranslationUnitDecl *DC) { in Create() argument
4934 return new (C, DC) ExternCContextDecl(DC); in Create()
4939 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4941 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, IdentL); in Create()
4944 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4948 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, GnuLabelL); in Create()
4973 ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4977 return new (C, DC) ImplicitParamDecl(C, DC, IdLoc, Id, Type, ParamKind); in Create()
4991 FunctionDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in Create() argument
4997 FunctionDecl *New = new (C, DC) FunctionDecl( in Create()
4998 Function, C, DC, StartLoc, NameInfo, T, TInfo, SC, UsesFPIntrin, in Create()
5010 BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5011 return new (C, DC) BlockDecl(DC, L); in Create()
5018 CapturedDecl::CapturedDecl(DeclContext *DC, unsigned NumParams) in CapturedDecl() argument
5019 : Decl(Captured, DC, SourceLocation()), DeclContext(Captured), in CapturedDecl()
5022 CapturedDecl *CapturedDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5024 return new (C, DC, additionalSizeToAlloc<ImplicitParamDecl *>(NumParams)) in Create()
5025 CapturedDecl(DC, NumParams); in Create()
5055 IndirectFieldDecl::IndirectFieldDecl(ASTContext &C, DeclContext *DC, in IndirectFieldDecl() argument
5059 : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH.data()), in IndirectFieldDecl()
5068 IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, in Create() argument
5071 return new (C, DC) IndirectFieldDecl(C, DC, L, Id, T, CH); in Create()
5089 TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5092 return new (C, DC) TypedefDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5139 TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5143 return new (C, DC) TypeAliasDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5169 FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5173 return new (C, DC) FileScopeAsmDecl(DC, Str, AsmLoc, RParenLoc); in Create()
5184 EmptyDecl *EmptyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5185 return new (C, DC) EmptyDecl(DC, L); in Create()
5207 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5210 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5218 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5220 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5225 ImportDecl *ImportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5228 return new (C, DC, in Create()
5230 ImportDecl(DC, StartLoc, Imported, IdentifierLocs); in Create()
5233 ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC, in CreateImplicit() argument
5237 ImportDecl *Import = new (C, DC, additionalSizeToAlloc<SourceLocation>(1)) in CreateImplicit()
5238 ImportDecl(DC, StartLoc, Imported, EndLoc); in CreateImplicit()
5271 ExportDecl *ExportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5273 return new (C, DC) ExportDecl(DC, ExportLoc); in Create()