[PATCH] D114519: [clang-format] [PR52595] clang-format does not recognize rvalue references to array
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 24 03:03:23 PST 2021
MyDeveloperDay added inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:9662
+TEST_F(FormatTest, AmpAmpOperator) {
+ verifyFormat("int operator()(T (&&)[N]) { return 1; }");
----------------
curdeius wrote:
> Nit: these are not &/&& operators but references so the test name seems incorrect.
oh yes sorry that was my bad so I could just run this one test through the debugger, I just needed a unique name, I should change that.
================
Comment at: clang/unittests/Format/FormatTest.cpp:21879
verifyFormat("Foo::operator&&();", Style);
- verifyFormat("operator&&(int(&&)(), class Foo);", Style);
+ verifyFormat("operator&&(int (&&)(), class Foo);", Style);
verifyFormat("operator const nsTArrayRight<E> &()", Style);
----------------
curdeius wrote:
> MyDeveloperDay wrote:
> > this test should be consistent with
> >
> > ```
> > verifyFormat("operator&(int (&)(), class Foo);", Style);
> > ```
> Should we test
> ```
> verifyFormat("operator&&(int (&)(), class Foo);", Style);
> ```
> here, and
> ```
> verifyFormat("operator&(int (&&)(), class Foo);", Style);
> ```
> above as well?
yes I'll add those, nice suggestion
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114519/new/
https://reviews.llvm.org/D114519
More information about the cfe-commits
mailing list