[PATCH] D75006: [clang-format] Wrap lines for C# property accessors

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 25 05:47:06 PST 2020


MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.

LGTM



================
Comment at: clang/unittests/Format/FormatTestCSharp.cpp:246
-               "    get;\n"
-               "}");
 
----------------
Nit: I feel like this layout should really be an option, (maybe for the future).

When we originally did the C# work, we did say we might want in the future to add options that might be specific like laying out the accessors 

I think VS has support for formatting them as either

```
public int Goo { set; get; }
```

and 

```
public int Goo
{
     set; get;
}
```

and the following is equally valid in my eyes

```
public int Goo
{
     set; 
     get;
}
```

as well as what is being proposed here of

```
public int Goo
{   set; get; }
```

I'm not completely sure how much the other options are controlling this at present and how much is not in the control of your merging

and how does that change when there is actually code in the setter and getter?





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

https://reviews.llvm.org/D75006





More information about the cfe-commits mailing list