[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-17 Thread Peter Stys via Phabricator via cfe-commits
peterstys added a comment. In D115738#3199988 , @MyDeveloperDay wrote: > Thank you for the patch We'll need your name and email address for that, but > yes we'll be happy to commit it for you. > > If you think you'd like to play some more, then you can

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-17 Thread Peter Stys via Phabricator via cfe-commits
peterstys added a comment. In D115738#3199896 , @MyDeveloperDay wrote: > In D115738#3199879 , @peterstys > wrote: > >> This is my first PR into this repo. I'd like to learn more about the process >> of

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-17 Thread Peter Stys via Phabricator via cfe-commits
peterstys added a comment. This is my first PR into this repo. I'd like to learn more about the process of submitting patches, specifically about: - Do I need to get LGTM from all the reviewers before I can submit it? - There are some build failures on the CI, but look unrelated, do I force

[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,

[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

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-16 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394802. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/lib/Format/UnwrappedLineParser.h clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-16 Thread Peter Stys via Phabricator via cfe-commits
peterstys marked 4 inline comments as done. peterstys added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1870 // C# may break after => if the next character is a newline. if (Style.isCSharp() && Style.BraceWrapping.AfterFunction ==

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-16 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394814. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/lib/Format/UnwrappedLineParser.h clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-16 Thread Peter Stys via Phabricator via cfe-commits
peterstys added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:766 + + verifyFormat(R"(// +public class Sample { peterstys wrote: > peterstys wrote: > > MyDeveloperDay wrote: > > > Nit: (only my preference) but I don't like the use of

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-16 Thread Peter Stys via Phabricator via cfe-commits
peterstys marked an inline comment as done. peterstys added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:766 + + verifyFormat(R"(// +public class Sample { peterstys wrote: > MyDeveloperDay wrote: > > Nit: (only my preference) but I

[PATCH] D115738: [clang-format] Code following C# Lambda Expressions has wrong formatting

2021-12-14 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394299. peterstys added a comment. Applied clang-formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D115738: [clang-format] Code following C# Lambda Expressions has wrong formatting

2021-12-14 Thread Peter Stys via Phabricator via cfe-commits
peterstys created this revision. peterstys added a reviewer: MyDeveloperDay. peterstys requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The alignment fix introduced by https://reviews.llvm.org/D104388 caused a regression whereby formatting

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394506. peterstys marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394503. peterstys added a comment. Applied fixes suggested by the reviewers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys added a comment. In D115738#3193107 , @MyDeveloperDay wrote: > I tested this on the original code that made me make the original change, and > I like your fix much better ;-) > > Thank you for this patch, interested on working on other C#

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394505. peterstys marked 4 inline comments as done. peterstys added a comment. Removed braces. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394614. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/lib/Format/UnwrappedLineParser.h clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394603. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTestCSharp.cpp Index: clang/unittests/Format/FormatTestCSharp.cpp

[PATCH] D115738: [clang-format] Fix formatting of the code that follows C# Lambda Expressions

2021-12-15 Thread Peter Stys via Phabricator via cfe-commits
peterstys updated this revision to Diff 394608. peterstys marked 2 inline comments as done. peterstys added a comment. Created tryParseCSharpLambda function to avoid code duplication. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115738/new/ https://reviews.llvm.org/D115738 Files: