This revision was automatically updated to reflect the committed changes.
Closed by commit rG0bb60e29f18b: [clang-format] Fixes for spaces around C#
object initializers (authored by Jonathan Coe ).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://review
krasimir accepted this revision.
krasimir added a comment.
This revision is now accepted and ready to land.
Thank you!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72401/new/
https://reviews.llvm.org/D72401
___
cfe-commits mailing list
cfe
jbcoe updated this revision to Diff 241694.
jbcoe added a comment.
Minor changes to address review comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72401/new/
https://reviews.llvm.org/D72401
Files:
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestCSharp.c
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2870
+if (Left.is(TT_Unknown) && Right.is(tok::l_brace) && Left.Previous &&
+Left.Previous->is(tok::kw_new))
+ return true;
krasimir wrote:
> The `TT_Unknown` i
krasimir added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2869
+// space before '{' in "new MyType {"
+if (Left.is(TT_Unknown) && Right.is(tok::l_brace) && Left.Previous &&
+Left.Previous->is(tok::kw_new))
krasimir wrote:
> T
krasimir added inline comments.
Comment at: clang/unittests/Format/FormatTestCSharp.cpp:379
+ FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp);
+ Style.SpaceBeforeParens = FormatStyle::SBPO_Always;
+
Is this needed for the formatting below? I find it
krasimir requested changes to this revision.
krasimir added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/Format/TokenAnnotator.cpp:2869
+// space before '{' in "new MyType {"
+if (Left.is(TT_Unknown) && Right.is(tok::l_brace) && Le
MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.
This revision is now accepted and ready to land.
LGTM, thanks once again for the C# patch!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72401/new/
https://reviews.llvm.org/D724
jbcoe created this revision.
jbcoe added a project: clang-format.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
jbcoe added reviewers: MyDeveloperDay, klimek.
Fix spaces around typename and [] in C# object initializers.
Handling of newlines and binpacking will be addresse