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()
706 for (const DeclContext *DC = D->getDeclContext(); in getLVForNamespaceScopeDecl() local
707 !isa<TranslationUnitDecl>(DC); in getLVForNamespaceScopeDecl()
708 DC = DC->getParent()) { in getLVForNamespaceScopeDecl()
709 const auto *ND = dyn_cast<NamespaceDecl>(DC); in getLVForNamespaceScopeDecl()
1148 const DeclContext *DC = getDeclContext()->getRedeclContext(); in isReserved() local
1149 if (DC->isTranslationUnit()) in isReserved()
1308 LinkageInfo LinkageComputer::getLVForClosure(const DeclContext *DC, in getLVForClosure() argument
1314 Owner = dyn_cast<NamedDecl>(DC); in getLVForClosure()
1752 for (const DeclContext *DC : llvm::reverse(Contexts)) { in printNestedNameSpecifier() local
1753 if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(DC)) { in printNestedNameSpecifier()
1759 } else if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) { in printNestedNameSpecifier()
1766 } else if (const auto *RD = dyn_cast<RecordDecl>(DC)) { in printNestedNameSpecifier()
1771 } else if (const auto *FD = dyn_cast<FunctionDecl>(DC)) { in printNestedNameSpecifier()
1792 } else if (const auto *ED = dyn_cast<EnumDecl>(DC)) { in printNestedNameSpecifier()
1805 OS << *cast<NamedDecl>(DC); in printNestedNameSpecifier()
2116 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC, in VarDecl() argument
2120 : DeclaratorDecl(DK, DC, IdLoc, Id, T, TInfo, StartLoc), in VarDecl()
2133 VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartL, in Create() argument
2136 return new (C, DC) VarDecl(Var, C, DC, StartL, IdL, Id, T, TInfo, S); in Create()
2198 const DeclContext *DC = D.getDeclContext(); in getDeclLanguageLinkage() local
2199 if (DC->isRecord()) in getDeclLanguageLinkage()
2214 const DeclContext *DC = D.getDeclContext(); in isDeclExternC() local
2215 if (DC->isRecord()) { in isDeclExternC()
2907 ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
2912 return new (C, DC) ParmVarDecl(ParmVar, C, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
3029 FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, in FunctionDecl() argument
3036 : DeclaratorDecl(DK, DC, NameInfo.getLoc(), NameInfo.getName(), T, TInfo, in FunctionDecl()
3505 for (const DeclContext *DC = getDeclContext(); in isGlobal() local
3506 DC->isNamespace(); in isGlobal()
3507 DC = DC->getParent()) { in isGlobal()
3508 if (const auto *Namespace = cast<NamespaceDecl>(DC)) { in isGlobal()
4537 FieldDecl *FieldDecl::Create(const ASTContext &C, DeclContext *DC, in Create() argument
4542 return new (C, DC) FieldDecl(Decl::Field, DC, StartLoc, IdLoc, Id, T, TInfo, in Create()
4691 TagDecl::TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, in TagDecl() argument
4694 : TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), redeclarable_base(C), in TagDecl()
4827 EnumDecl::EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in EnumDecl() argument
4830 : TagDecl(Enum, TagTypeKind::Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in EnumDecl()
4844 EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
4849 auto *Enum = new (C, DC) EnumDecl(C, DC, StartLoc, IdLoc, Id, PrevDecl, in Create()
4985 DeclContext *DC, SourceLocation StartLoc, in RecordDecl() argument
4988 : TagDecl(DK, TK, C, DC, IdLoc, Id, PrevDecl, StartLoc) { in RecordDecl()
5007 RecordDecl *RecordDecl::Create(const ASTContext &C, TagKind TK, DeclContext *DC, in Create() argument
5010 RecordDecl *R = new (C, DC) RecordDecl(Record, TK, C, DC, in Create()
5211 BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc) in BlockDecl() argument
5212 : Decl(Block, DC, CaretLoc), DeclContext(Block) { in BlockDecl()
5278 TranslationUnitDecl *DC, in Create() argument
5283 new (C, DC, additionalSizeToAlloc<char>(Arg.size() + 1)) in Create()
5284 PragmaCommentDecl(DC, CommentLoc, CommentKind); in Create()
5300 PragmaDetectMismatchDecl::Create(const ASTContext &C, TranslationUnitDecl *DC, in Create() argument
5305 new (C, DC, additionalSizeToAlloc<char>(ValueStart + Value.size() + 1)) in Create()
5306 PragmaDetectMismatchDecl(DC, Loc, ValueStart); in Create()
5325 TranslationUnitDecl *DC) { in Create() argument
5326 return new (C, DC) ExternCContextDecl(DC); in Create()
5331 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5333 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, IdentL); in Create()
5336 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5340 return new (C, DC) LabelDecl(DC, IdentL, II, nullptr, GnuLabelL); in Create()
5371 ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5375 return new (C, DC) ImplicitParamDecl(C, DC, IdLoc, Id, Type, ParamKind); in Create()
5389 FunctionDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, in Create() argument
5395 FunctionDecl *New = new (C, DC) FunctionDecl( in Create()
5396 Function, C, DC, StartLoc, NameInfo, T, TInfo, SC, UsesFPIntrin, in Create()
5408 BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5409 return new (C, DC) BlockDecl(DC, L); in Create()
5416 CapturedDecl::CapturedDecl(DeclContext *DC, unsigned NumParams) in CapturedDecl() argument
5417 : Decl(Captured, DC, SourceLocation()), DeclContext(Captured), in CapturedDecl()
5420 CapturedDecl *CapturedDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5422 return new (C, DC, additionalSizeToAlloc<ImplicitParamDecl *>(NumParams)) in Create()
5423 CapturedDecl(DC, NumParams); in Create()
5438 EnumConstantDecl::EnumConstantDecl(const ASTContext &C, DeclContext *DC, in EnumConstantDecl() argument
5441 : ValueDecl(EnumConstant, DC, L, Id, T), Init((Stmt *)E) { in EnumConstantDecl()
5460 IndirectFieldDecl::IndirectFieldDecl(ASTContext &C, DeclContext *DC, in IndirectFieldDecl() argument
5464 : ValueDecl(IndirectField, DC, L, N, T), Chaining(CH.data()), in IndirectFieldDecl()
5473 IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, in Create() argument
5476 return new (C, DC) IndirectFieldDecl(C, DC, L, Id, T, CH); in Create()
5495 TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5499 return new (C, DC) TypedefDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5546 TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5551 return new (C, DC) TypeAliasDecl(C, DC, StartLoc, IdLoc, Id, TInfo); in Create()
5578 FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5582 return new (C, DC) FileScopeAsmDecl(DC, Str, AsmLoc, RParenLoc); in Create()
5598 DeclContext *DC = C.getTranslationUnitDecl(); in Create() local
5600 return new (C, DC) TopLevelStmtDecl(DC, Loc, Statement); in Create()
5621 EmptyDecl *EmptyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) { in Create() argument
5622 return new (C, DC) EmptyDecl(DC, L); in Create()
5629 HLSLBufferDecl::HLSLBufferDecl(DeclContext *DC, bool CBuffer, in HLSLBufferDecl() argument
5632 : NamedDecl(Decl::Kind::HLSLBuffer, DC, IDLoc, DeclarationName(ID)), in HLSLBufferDecl()
5652 DeclContext *DC = LexicalParent; in Create() local
5654 new (C, DC) HLSLBufferDecl(DC, CBuffer, KwLoc, ID, IDLoc, LBrace); in Create()
5679 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5682 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5690 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc, in ImportDecl() argument
5692 : Decl(Import, DC, StartLoc), ImportedModule(Imported), in ImportDecl()
5697 ImportDecl *ImportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5700 return new (C, DC, in Create()
5702 ImportDecl(DC, StartLoc, Imported, IdentifierLocs); in Create()
5705 ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC, in CreateImplicit() argument
5709 ImportDecl *Import = new (C, DC, additionalSizeToAlloc<SourceLocation>(1)) in CreateImplicit()
5710 ImportDecl(DC, StartLoc, Imported, EndLoc); in CreateImplicit()
5743 ExportDecl *ExportDecl::Create(ASTContext &C, DeclContext *DC, in Create() argument
5745 return new (C, DC) ExportDecl(DC, ExportLoc); in Create()