[all-commits] [llvm/llvm-project] 8fa743: [clang-format] C# property formatting can be contr...

Jonathan B Coe via All-commits all-commits at lists.llvm.org
Fri May 15 06:21:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fa743ab82027da443bac050e86b70bcdb78cbee
      https://github.com/llvm/llvm-project/commit/8fa743ab82027da443bac050e86b70bcdb78cbee
  Author: Jonathan Coe <jbcoe at google.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/FormatTestCSharp.cpp

  Log Message:
  -----------
  [clang-format] C# property formatting can be controlled by config options

Summary:
Allow brace wrapping in C# property accessors to be controlled by configuration options.

Add new tests and revert old test results for Microsoft style to their previous state (as intended).

`FormatStyle.BraceWrapping.AfterFunction = true;` will change automatic property formatting from

```
Type MyType { get; set }
```

to

```
Type MyType
{ get; set }
```

Reviewers: krasimir, MyDeveloperDay

Reviewed By: krasimir, MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D79000




More information about the All-commits mailing list