[clang] [clang-tools-extra] [libcxx] [Clang] Keep the deduced TSI in sync with its DeducedTemplateSpecializationType (PR #181105)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 08:02:23 PST 2026


https://github.com/mizvekov commented:

In general we don't want to deal with deduced types in template instantiation, and instead perform deduction again, because dependent types can't necessarily be instantiated, as they may for example contain a DependentTy. We would need to be very careful with corner cases otherwise.

In general, for entities which type deduction applies, we keep separate type-as-written as a TypeLoc, and a deduced type as just a QualType. We never deduce the typeloc / TSI.

I'd be afraid this change would not be correct for such cases, and would create an inconsistency with how we deal with such entities.

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


More information about the cfe-commits mailing list