[PATCH] D111283: [clang] template / auto deduction deduces common sugar
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 12:48:17 PDT 2022
mizvekov added a comment.
In D111283#3784663 <https://reviews.llvm.org/D111283#3784663>, @ychen wrote:
> 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`?
The ElaboratedType is a sort of a `companion node` to other nodes that represent things in the language which can have (non-dependent) nested name qualifiers (a NNS for short) and / or an elaborated type specifier (such as the `struct` in `struct A`).
It's only purpose is to carry that extra bit of data, like some external storage really, and it shouldn't affect the semantics of the program once the source code is parsed into an AST.
Here, in your example, the ElaboratedType is there, as a companion to that TemplateSpecializationType, just to say that this template specialization was written without any name qualifiers nor elaboration.
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