[PATCH] D146995: [clang-format] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.
Jon Phillips via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 27 12:34:43 PDT 2023
jp4a50 added inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:21978
Style);
- EXPECT_EQ("SomeResult doSomething(SomeObject promise) {\n"
- " return promise.then(\n"
----------------
The refactored version of these test cases has been moved up to immediately follow the setting of `OuterScope` so that the result can be compared with the identical code sample above which doesn't use `OuterScope`. It was odd that these weren't grouped together before.
================
Comment at: clang/unittests/Format/FormatTest.cpp:21994
+ Style);
// TODO: The current formatting has a minor issue that's not worth fixing
// right now whereby the closing brace is indented relative to the signature
----------------
This is the comment that I believe is calling out the seemingly broken formatting behaviour in the test case directly above it. I think it's pretty clear that the code in that test case should not be formatted that way when `OuterScope` is set (or even without it - the formatting just doesn't make any sense really).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146995/new/
https://reviews.llvm.org/D146995
More information about the cfe-commits
mailing list