Lines Matching refs:DC

305   const DeclContext *DC = D->getDeclContext();  in getOutermostFuncOrBlockContext()  local
306 while (DC->getDeclKind() != Decl::TranslationUnit) { in getOutermostFuncOrBlockContext()
307 if (isa<FunctionDecl>(DC) || isa<BlockDecl>(DC)) in getOutermostFuncOrBlockContext()
308 Ret = cast<Decl>(DC); in getOutermostFuncOrBlockContext()
309 DC = DC->getParent(); in getOutermostFuncOrBlockContext()
699 for (const DeclContext *DC = D->getDeclContext(); in getLVForNamespaceScopeDecl() local
700 !isa<TranslationUnitDecl>(DC); in getLVForNamespaceScopeDecl()
701 DC = DC->getParent()) { in getLVForNamespaceScopeDecl()
702 const auto *ND = dyn_cast<NamespaceDecl>(DC); in getLVForNamespaceScopeDecl()
1141 const DeclContext *DC = getDeclContext()->getRedeclContext(); in isReserved() local
1142 if (DC->isTranslationUnit()) in isReserved()
1308 LinkageInfo LinkageComputer::getLVForClosure(const DeclContext *DC, in getLVForClosure() argument
1314 Owner = dyn_cast<NamedDecl>(DC); in getLVForClosure()
1767 for (const DeclContext *DC : llvm::reverse(Contexts)) { in printNestedNameSpecifier() local
1768 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) { in printNestedNameSpecifier()
1774 } else if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) { in printNestedNameSpecifier()
1781 } else if (const auto *RD = dyn_cast<RecordDecl>(DC)) { in printNestedNameSpecifier()
1786 } else if (const auto *FD = dyn_cast<FunctionDecl>(DC)) { in printNestedNameSpecifier()
1807 } else if (const auto *ED = dyn_cast<EnumDecl>(DC)) { in printNestedNameSpecifier()
1820 OS << *cast<NamedDecl>(DC); in printNestedNameSpecifier()
2131 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC, in VarDecl() argument
2135 : DeclaratorDecl(DK, DC, IdLoc, Id, T, TInfo, StartLoc), in VarDecl()
2148 VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartL, in Create() argument
2151 return new (C, DC) VarDecl(Var, C, DC, StartL, IdL, Id, T, TInfo, S); in Create()
2213 const DeclContext *DC = D.getDeclContext(); in getDeclLanguageLinkage() local
2214 if (DC->isRecord()) in getDeclLanguageLinkage()
2229 const DeclContext *DC = D.getDeclContext(); in isDeclExternC() local
2230 if (DC->isRecord()) { in isDeclExternC()
2905 ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
2910 return new (C, DC) ParmVarDecl(ParmVar, C, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
3027 FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, in FunctionDecl() argument
3034 : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo, in FunctionDecl()
3468 for (const DeclContext *DC = getDeclContext(); in isGlobal() local
3469 DC->isNamespace(); in isGlobal()
3470 DC = DC->getParent()) { in isGlobal()
3471 if (const auto *Namespace = cast<NamespaceDecl>(DC)) { in isGlobal()
4489 FieldDecl *FieldDecl::Create(const ASTContext &C, DeclContext *DC, in Create() argument
4494 return new (C, DC) FieldDecl(Decl::Field, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
4643 TagDecl::TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, in TagDecl() argument
4646 : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), redeclarable_base(C), in TagDecl()
4779 EnumDecl::EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in EnumDecl() argument
4782 : TagDecl(Enum, TagTypeKind::Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4796 EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4801 auto *Enum = new (C, DC) EnumDecl(C, DC, StartLoc, IdLoc, Id, PrevDecl, in Create()
4937 DeclContext *DC, SourceLocation StartLoc, in RecordDecl() argument
4940 : TagDecl(DK, TK, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in RecordDecl()
4959 RecordDecl *RecordDecl::Create(const ASTContext &C, TagKind TK, DeclContext *DC, in Create() argument
4962 RecordDecl *R = new (C, DC) RecordDecl(Record, TK, C, DC, in Create()
5156 BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc) in BlockDecl() argument
5157 : Decl(Block, DC, CaretLoc), DeclContext(Block) { in BlockDecl()
5216 TranslationUnitDecl *DC, in Create() argument
5221 new (C, DC, additionalSizeToAlloc<char>(Arg.size() + 1)) in Create()
5222 PragmaCommentDecl(DC, CommentLoc, CommentKind); in Create()
5238 PragmaDetectMismatchDecl::Create(const ASTContext &C, TranslationUnitDecl *DC, in Create() argument
5243 new (C, DC, additionalSizeToAlloc<char>(ValueStart + Value.size() + 1)) in Create()
5244 PragmaDetectMismatchDecl(DC, Loc, ValueStart); in Create()
5263 TranslationUnitDecl *DC) { in Create() argument
5264 return new (C, DC) ExternCContextDecl(DC); in Create()
5269 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5271 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, IdentL); in Create()
5274 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5278 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, GnuLabelL); in Create()
5309 ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5313 return new (C, DC) ImplicitParamDecl(C, DC, IdLoc, Id, Type, ParamKind); in Create()
5327 FunctionDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in Create() argument
5333 FunctionDecl *New = new (C, DC) FunctionDecl( in Create()
5334 Function, C, DC, StartLoc, NameInfo, T, TInfo, SC, UsesFPIntrin, in Create()
5346 BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5347 return new (C, DC) BlockDecl(DC, L); in Create()
5354 CapturedDecl::CapturedDecl(DeclContext *DC, unsigned NumParams) in CapturedDecl() argument
5355 : Decl(Captured, DC, SourceLocation()), DeclContext(Captured), in CapturedDecl()
5358 CapturedDecl *CapturedDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5360 return new (C, DC, additionalSizeToAlloc<ImplicitParamDecl *>(NumParams)) in Create()
5361 CapturedDecl(DC, NumParams); in Create()
5376 EnumConstantDecl::EnumConstantDecl(const ASTContext &C, DeclContext *DC, in EnumConstantDecl() argument
5379 : ValueDecl(EnumConstant, DC, L, Id, T), Init((Stmt *)E) { in EnumConstantDecl()
5398 IndirectFieldDecl::IndirectFieldDecl(ASTContext &C, DeclContext *DC, in IndirectFieldDecl() argument
5402 : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH.data()), in IndirectFieldDecl()
5411 IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, in Create() argument
5414 return new (C, DC) IndirectFieldDecl(C, DC, L, Id, T, CH); in Create()
5433 TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5436 return new (C, DC) TypedefDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5483 TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5487 return new (C, DC) TypeAliasDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5513 FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5517 return new (C, DC) FileScopeAsmDecl(DC, Str, AsmLoc, RParenLoc); in Create()
5534 DeclContext *DC = C.getTranslationUnitDecl(); in Create() local
5536 return new (C, DC) TopLevelStmtDecl(DC, BeginLoc, Statement); in Create()
5551 EmptyDecl *EmptyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5552 return new (C, DC) EmptyDecl(DC, L); in Create()
5559 HLSLBufferDecl::HLSLBufferDecl(DeclContext *DC, bool CBuffer, in HLSLBufferDecl() argument
5562 : NamedDecl(Decl::Kind::HLSLBuffer, DC, IDLoc, DeclarationName(ID)), in HLSLBufferDecl()
5582 DeclContext *DC = LexicalParent; in Create() local
5584 new (C, DC) HLSLBufferDecl(DC, CBuffer, KwLoc, ID, IDLoc, LBrace); in Create()
5608 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5611 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5619 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5621 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5626 ImportDecl *ImportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5629 return new (C, DC, in Create()
5631 ImportDecl(DC, StartLoc, Imported, IdentifierLocs); in Create()
5634 ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC, in CreateImplicit() argument
5638 ImportDecl *Import = new (C, DC, additionalSizeToAlloc<SourceLocation>(1)) in CreateImplicit()
5639 ImportDecl(DC, StartLoc, Imported, EndLoc); in CreateImplicit()
5672 ExportDecl *ExportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5674 return new (C, DC) ExportDecl(DC, ExportLoc); in Create()