[clang] [Sema] Avoid excessive desuraging in template deduction (PR #100144)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 23 09:32:40 PDT 2024


================
@@ -688,10 +688,7 @@ DeduceTemplateSpecArguments(Sema &S, TemplateParameterList *TemplateParams,
 
   // FIXME: To preserve sugar, the TST needs to carry sugared resolved
   // arguments.
-  ArrayRef<TemplateArgument> PResolved =
-      TP->getCanonicalTypeInternal()
-          ->castAs<TemplateSpecializationType>()
-          ->template_arguments();
+  ArrayRef<TemplateArgument> PResolved = TP->template_arguments();
----------------
ilya-biryukov wrote:

Here's where we are loosing `fields` because there are not part of the canonical type.

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


More information about the cfe-commits mailing list