[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 5 13:54:58 PDT 2024
================
@@ -1198,6 +1198,18 @@ void TextNodeDumper::dumpBareTemplateName(TemplateName TN) {
dumpTemplateName(STS->getReplacement(), "replacement");
return;
}
+ case TemplateName::DeducedTemplate: {
+ OS << " deduced";
+ const DeducedTemplateStorage *DTS = TN.getAsDeducedTemplateName();
+ dumpTemplateName(DTS->getUnderlying(), "underlying");
+ AddChild("defaults", [=] {
+ auto [StartPos, Args] = DTS->getDefaultArguments();
+ OS << " start " << StartPos;
+ for (const TemplateArgument &Arg : Args)
+ AddChild([=] { Visit(Arg, SourceRange()); });
+ });
+ return;
+ }
----------------
mizvekov wrote:
Yeah, this could be tested in ast-dump tests before we restricted this to partial ordering. Now it only helps in debugging there.
https://github.com/llvm/llvm-project/pull/94981
More information about the cfe-commits
mailing list