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

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 9 10:14:13 PDT 2020


krasimir 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:
> 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.


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

https://reviews.llvm.org/D75731





More information about the cfe-commits mailing list