[PATCH] D111283: [clang] template / auto deduction deduces common sugar
Yuanfang Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 12:34:00 PDT 2022
ychen added a comment.
In D111283#3784648 <https://reviews.llvm.org/D111283#3784648>, @mizvekov wrote:
> In D111283#3784615 <https://reviews.llvm.org/D111283#3784615>, @ychen wrote:
>
>> `A<T>` is currently modeled as ElaboratedType. It was `TemplateSpecializationType` before. Reading comments for `ElaboratedType`, it looks like sugar type might not be needed here?
>
> Ah you might be seeing an ElaboratedTYpe here, where there was none before, perhaps because of https://reviews.llvm.org/D112374, and not because of this patch.
>
> Yeah ElaboratedType is just sugar that should have no effect on partial ordering. But then I think no sugar should have effect on partial ordering. What is stopping you from just looking at the canonical type instead? On a canonical type, you would never see an ElaboratedType node, or a TemplateSpecializationType which is not dependent.
Thanks for the link. I'm not blocked by any of these patches, instead just trying to have a mental model of when to expect the sugared type :-). For partial ordering, the `TemplateSpecializationType` could be dependent, since the injected template arguments are dependent, I guess that's the reason there is the `ElaboratedType`?
> Is this related to the AutoType canonicalization issues we were discussing in the other patch of yours?
Nope. I found this AST difference while investigating D133683 <https://reviews.llvm.org/D133683>.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111283/new/
https://reviews.llvm.org/D111283
More information about the cfe-commits
mailing list