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
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
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:
> > >
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
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
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
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.
-
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
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
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
___
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
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
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
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
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
__
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
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
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
18 matches
Mail list logo