[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-21 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb9f6e09b850a: [clang-format][NFC] Handle wrapping after => in mustBreakBefore() (authored by owenpan). Changed prior to commit: https://reviews.ll

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Good that you renamed the method. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115967/new/ https://reviews.llvm.org/D115967 ___ cfe-commits mailing list cfe-commi

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-21 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1955-1957 +if (Style.isCSharp() && FormatTok->is(TT_FatArrow) && +tryToParseChildBlock()) + continue; peterstys wrote: > owenpan wrote: > > peterstys wrote: > > >

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-21 Thread Peter Stys via Phabricator via cfe-commits
peterstys added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1955-1957 +if (Style.isCSharp() && FormatTok->is(TT_FatArrow) && +tryToParseChildBlock()) + continue; owenpan wrote: > peterstys wrote: > > It seems that this b

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115967/new/ https://reviews.llvm.org/D115967 ___ cfe-commits mailing li

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 395544. owenpan added a comment. Removed more redundant code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115967/new/ https://reviews.llvm.org/D115967 Files: clang/lib/Format/TokenAnnotator.cpp clang/lib/Format/UnwrappedLineParser.cpp clang

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread Owen Pan via Phabricator via cfe-commits
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. -

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1955-1957 +if (Style.isCSharp() && FormatTok->is(TT_FatArrow) && +tryToParseChildBlock()) + continue; peterstys wrote: > It seems that this block could be removed

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread Peter Stys via Phabricator via cfe-commits
peterstys added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1955-1957 +if (Style.isCSharp() && FormatTok->is(TT_FatArrow) && +tryToParseChildBlock()) + continue; It seems that this block could be removed altogether, beca

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM, (the original code had a unit test so we should be good). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115967/new/ https://reviews.llvm.org/D115967 ___

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2005 - } - break; case tok::l_square: MyDeveloperDay wrote: > Is this case not covered by this? I presume not as you didn't remove any unit > tests > > https://gi

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2005 - } - break; case tok::l_square: Is this case not covered by this? I presume not as you didn't remove any unit tests https://github.com/llvm/llvm-proj

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-19 Thread Owen Pan via Phabricator via cfe-commits
owenpan marked an inline comment as done. owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1641 case tok::equal: - // Fat arrows (=>) have tok::TokenKind tok::equal but TokenType - // TT_FatArrow. They always start an expression o

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-19 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 395380. owenpan added a comment. Additional cleanups: - Restrict parsing `=>` to JavaScript and C#. - Rename `tryToParseCSharpLambda` to `tryToParseChildBlock`. - Remove redundant caret `case`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115967/ne

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-17 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. nice. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115967/new/ https://reviews.llvm.org/D115967 __

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-17 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1641 case tok::equal: - // Fat arrows (=>) have tok::TokenKind tok::equal but TokenType - // TT_FatArrow. They always start an expression or a child block if - // followed by a

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-17 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1641 case tok::equal: - // Fat arrows (=>) have tok::TokenKind tok::equal but TokenType - // TT_FatArrow. They always start an expression or a child block if - // fo

[PATCH] D115967: [clang-format][NFC] Handle wrapping after => in mustBreakBefore()

2021-12-17 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, curdeius, HazardyKnusperkeks, peterstys. owenpan added a project: clang-format. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Move the handling of brace wrap