[PATCH] D113393: [c++2b] Implement P0849R8 auto(x)
Zhihao Yuan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 23 13:29:29 PST 2021
lichray added a comment.
In D113393#3128835 <https://reviews.llvm.org/D113393#3128835>, @rsmith wrote:
> It looks like we'll need some additional work on disambiguation to handle cases like:
>
> struct A { int n; } a;
> void f() { auto(&a)->n = 0; }
>
> I think that's valid, but right now we misparse it as a declaration of a variable `&a`. [...]:
>
> struct A { int n; } a;
> using T = A*;
> void f() { T(&a)->n = 1; }
Solved the issue and added test cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113393/new/
https://reviews.llvm.org/D113393
More information about the cfe-commits
mailing list