[PATCH] D113826: [clang-format][c++2b] support removal of the space between auto and {} in P0849R8
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 13 13:33:10 PST 2021
HazardyKnusperkeks added a comment.
In D113826#3129383 <https://reviews.llvm.org/D113826#3129383>, @lichray wrote:
> Thanks for the patch! It works for me, both for the `auto{x}` and `new auto{x}` cases. Some corner cases left:
>
> void f() { T(&a)->n = 1; }
> void f() { T{&a}->n = 1; } // xxx
> void g() { auto(&a)->n = 0; }
> void h() { auto{&a}->n = 0; } // xxx
>
> The `/// xxx` cases are formatted as
>
> void f() {
> T { &a } -> n = 1;
> }
>
> and
>
> void h() {
> auto{ &a } -> n = 0;
> }
>
> But this may not worth a fix (for now).
I'm sure someone will look into it, but this should not be handled by this change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113826/new/
https://reviews.llvm.org/D113826
More information about the cfe-commits
mailing list