================ @@ -35,6 +35,169 @@ static void populateMemberTypeInfo(RecordInfo &I, AccessSpecifier &Access, const DeclaratorDecl *D, bool IsStatic = false); +static void getTemplateParameters(const TemplateParameterList *TemplateParams, + llvm::raw_ostream &Stream) { + Stream << "template <"; + + for (unsigned i = 0; i < TemplateParams->size(); ++i) { + if (i > 0) + Stream << ", "; + + const NamedDecl *Param = TemplateParams->getParam(i); + if (const auto *TTP = llvm::dyn_cast<TemplateTypeParmDecl>(Param)) { + if (TTP->wasDeclaredWithTypename()) + Stream << "typename"; + else + Stream << "class"; + if (TTP->isParameterPack()) + Stream << "..."; + Stream << " " << TTP->getNameAsString(); ---------------- ilovepi wrote:
Not totally convinced my solution is correct, but we can follow up once we are testing the mustache implementation more thoroughly. https://github.com/llvm/llvm-project/pull/138065 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits