[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 20 16:26:06 PST 2021
owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1964-1965
}
- if (FormatTok->is(TT_FatArrow)) {
- nextToken();
- // Fat arrows can be followed by simple expressions or by child blocks
- // in curly braces.
- if (FormatTok->is(tok::l_brace)) {
- parseChildBlock();
- continue;
- }
- }
+ if (FormatTok->is(TT_FatArrow) && tryToParseChildBlock())
+ continue;
if (FormatTok->is(tok::l_brace)) {
----------------
Removing these two lines doesn't fail FormatTests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115967/new/
https://reviews.llvm.org/D115967
More information about the cfe-commits
mailing list