@@ -379,7 +379,7 @@ struct TemplateParameterListBuilder {
379379 // to construct the ImplicitConceptSpecializationDecl
380380 TemplateTypeParmDecl *T = TemplateTypeParmDecl::Create (
381381 Context, // AST context
382- Context. getTranslationUnitDecl (), // DeclContext
382+ Builder. Record -> getDeclContext (), // DeclContext
383383 SourceLocation (), SourceLocation (),
384384 /* depth=*/ 0 , // Depth in the template parameter list
385385 /* position=*/ 0 , // Position in the template parameter list
@@ -640,7 +640,7 @@ ConceptDecl *constructTypedBufferConceptDecl(Sema &S, NamespaceDecl *NSD) {
640640
641641 IdentifierInfo &ElementTypeII = Context.Idents .get (" element_type" );
642642 TemplateTypeParmDecl *T = TemplateTypeParmDecl::Create (
643- Context, Context. getTranslationUnitDecl (), DeclLoc, DeclLoc,
643+ Context, NSD-> getDeclContext (), DeclLoc, DeclLoc,
644644 /* depth=*/ 0 ,
645645 /* position=*/ 0 ,
646646 /* id=*/ &ElementTypeII,
@@ -660,14 +660,14 @@ ConceptDecl *constructTypedBufferConceptDecl(Sema &S, NamespaceDecl *NSD) {
660660
661661 // Create a ConceptDecl
662662 ConceptDecl *CD =
663- ConceptDecl::Create (Context, Context. getTranslationUnitDecl (), DeclLoc,
664- DeclName, ConceptParams, ConstraintExpr);
663+ ConceptDecl::Create (Context, NSD-> getDeclContext (), DeclLoc, DeclName ,
664+ ConceptParams, ConstraintExpr);
665665
666666 // Attach the template parameter list to the ConceptDecl
667667 CD->setTemplateParameters (ConceptParams);
668668
669669 // Add the concept declaration to the Translation Unit Decl
670- Context. getTranslationUnitDecl ()->addDecl (CD);
670+ NSD-> getDeclContext ()->addDecl (CD);
671671
672672 return CD;
673673}
0 commit comments