[PATCH] D113826: [clang-format][c++2b] support removal of the space between auto and {} in P0849R8
Zhihao Yuan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 13 11:45:08 PST 2021
lichray added a comment.
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113826/new/
https://reviews.llvm.org/D113826
More information about the cfe-commits
mailing list