Lines Matching defs:DC

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