================ @@ -323,30 +324,99 @@ struct TemplateParameterListBuilder { S.Context, Builder.Record->getDeclContext(), SourceLocation(), SourceLocation(), /* TemplateDepth */ 0, Position, &S.Context.Idents.get(Name, tok::TokenKind::identifier), - /* Typename */ false, - /* ParameterPack */ false); + /* Typename */ true, + /* ParameterPack */ false, + /* HasTypeConstraint*/ false); if (!DefaultValue.isNull()) Decl->setDefaultArgument( S.Context, S.getTrivialTemplateArgumentLoc(DefaultValue, QualType(), SourceLocation())); - + Decl->setReferenced(); Params.emplace_back(Decl); return *this; } - BuiltinTypeDeclBuilder &finalizeTemplateArgs() { + ConceptSpecializationExpr *getConceptSpecializationExpr(Sema &S, + ConceptDecl *CD) { + ASTContext &context = S.getASTContext(); + SourceLocation loc = Builder.Record->getBeginLoc(); + DeclarationNameInfo DNI(CD->getDeclName(), loc); + NestedNameSpecifierLoc NNSLoc; + DeclContext *DC = Builder.Record->getDeclContext(); + TemplateArgumentListInfo TALI(loc, loc); + + // assume that the concept decl has just one template parameter + TemplateTypeParmDecl *ConceptTTPD = dyn_cast<TemplateTypeParmDecl>( + CD->getTemplateParameters()->getParam(0)); + + clang::TemplateTypeParmDecl *T = clang::TemplateTypeParmDecl::Create( ---------------- bob80905 wrote:
I've added some helpful comments. https://github.com/llvm/llvm-project/pull/112600 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits