emilio added a comment.
In https://reviews.llvm.org/D32348#738704, @rsmith wrote:
> This change looks like it introduces a regression itself: given
>
> template<typename T> struct A {};
> template<typename T> using B = A<T*>;
> B<int> bi;
>
>
> ... requesting the template arguments for the type `B<int>` changes from
> producing `int` to producing `int*` with this patch, which seems to directly
> oppose the intentions of https://reviews.llvm.org/D26663.
FWIW when I wrote https://reviews.llvm.org/D26663, I did it because arguments
weren't inspectionable at all for `using` declarations. Actually both of them
would've worked for me.
> template<typename T> using C = T;
>
>
> With this patch, requesting the template arguments for `C<int>` gives `int`
> but requesting the template arguments of `C<A<void>>` gives `void` rather
> than `A<void>`.
That being said, that is _specially_ annoying (good catch btw). Annoying enough
to justify reverting this change I'd say...
I'll submit something with the test-cases. I guess people that depended on the
old translation will just need to live with it... shrug.
I guess I could do something clever like: If it's both a
`ClassTemplateSpecializationDecl`, and a `TemplateSpecializationType`, and the
template arguments of the second happen to not be a template specialization,
then use the `ClassTemplateSpecializationDecl`, otherwise the other, but that
seems fairly tricky to maintain, so I'd rather just do the former.
Thanks for looking through it, btw.
Repository:
rL LLVM
https://reviews.llvm.org/D32348
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits