[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
Wed Jun 12 20:56:50 PDT 2024


================
@@ -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:

Actually in this case the relevant hash tables were already declared mutable, but there were a couple of profile functions not marked const. Fixed.

https://github.com/llvm/llvm-project/pull/94981


More information about the cfe-commits mailing list