[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 6 13:34:52 PDT 2021


mizvekov added a comment.

In D110216#3044102 <https://reviews.llvm.org/D110216#3044102>, @aaronpuchert wrote:

> Unless I'm missing something, alignment on aliases is itself fragile. Let's say you have some template, then the instantiation with the alias is of course the same as the instantiation with the canonical type, so if that template has a member or local variable of that type parameter that won't get the alignment.

If the attribute was not just type sugar and could be made part of the canonical type, then the attribute would have to be attached to the canonical type of the alias when building it,
in a similar way to how you don't lose other structural parts of the type when canonicalizing it.

But then you would have to deal with the whole mess this would cause in the rest of clang :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110216



More information about the cfe-commits mailing list