[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 05:03:41 PDT 2022


mizvekov added a comment.

In D112374#3684722 <https://reviews.llvm.org/D112374#3684722>, @hans wrote:

> The problem is that just based on `Template<Foo>` it's not clear whether it's `S1::Foo` or `S2::Foo` that's referred to.

The logic in the diagnostic here ended up doing a silent single step desugar through a typedef in the 'aka'.

I think the danger of doing that as you exemplify is that, if you don't know what context the printed type belongs to, then it's hard to make sense of the meaning of what was written.

If we have to step through a sugar node which carries context, like type aliases / using types and such, perhaps we should go straight for the canonical type instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112374/new/

https://reviews.llvm.org/D112374



More information about the cfe-commits mailing list