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

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 5 16:09:50 PDT 2021


aaronpuchert added a comment.

In D110216#3041117 <https://reviews.llvm.org/D110216#3041117>, @mizvekov wrote:

> In D110216#3040748 <https://reviews.llvm.org/D110216#3040748>, @craig.topper wrote:
>
>> Looks like this fixes PR51282.
>
> I guess it does fix it, but the underlying implementation of alignment is very fragile. The alignment is stored in `AttributedType` nodes, which are always sugar, so they are not considered part of the type in a structural sense...

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.


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