[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 10 08:57:13 PDT 2025
================
@@ -3250,8 +3251,7 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD,
TemplateArgument NumArgsArg = Converted[2];
if (NumArgsArg.isDependent())
- return Context.getCanonicalTemplateSpecializationType(TemplateName(BTD),
- Converted);
+ return QualType();
----------------
mizvekov wrote:
This just feeds into the CanonType / UnderlyingType of the TemplateSpecializationType created within CheckTemplateId, and returning a null qualtype here has the same effect; it will create a canonical TST with this name and arguments, but is less error prone and there is better sanity checking.
https://github.com/llvm/llvm-project/pull/135119
More information about the cfe-commits
mailing list