[PATCH] D75731: [clang-format] C# does not indent braced initializers as continuations

Jonathan B Coe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 9 10:14:58 PDT 2020


jbcoe marked 2 inline comments as done.
jbcoe added inline comments.


================
Comment at: clang/unittests/Format/FormatTestCSharp.cpp:544
 Shape[] shapes = new[] { new Circle { Radius = 2.7281, Colour = Colours.Red },
-                         new Square {
-                             Side = 101.1,
-                             Colour = Colours.Yellow,
-                         } };)",
+                         new Square { Side = 101.1, Colour = Colours.Yellow } };)",
                Style);
----------------
krasimir wrote:
> krasimir wrote:
> > Please add test cases that demonstrate the +2 indent used when breaking inside C# object initializers.
> Consider also adding an example with a trailing comma if the behavior there can be different than the one without a trailing comma.
The test at L 529 already covers 2 space indent and a trailing comma.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75731/new/

https://reviews.llvm.org/D75731





More information about the cfe-commits mailing list