================ @@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const TemplateArgument &ArgPack, return TemplateName(Subst); } +/// Retrieve the template name that represents a template name +/// deduced from a specialization. +TemplateName +ASTContext::getDeducedTemplateName(TemplateName Underlying, + DefaultArguments DefaultArgs) const { + if (!DefaultArgs) + return Underlying; + + auto &Self = const_cast<ASTContext &>(*this); ---------------- mizvekov wrote:
This is done throughout the ASTContext and is not novel here. We wish to be able to create a new node from a const ASTContext reference. These creation functions mostly behave const-ish, they just use hash tables in the ASTContext for caching / identity purposes. The other alternative is to declare these hash tables as mutable, though this would necessitate a large noisy change to update everything at once. https://github.com/llvm/llvm-project/pull/94981 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits