[clang-format] Improved parser for C# properties
authorJonathan Coe <jbcoe@google.com>
Tue, 28 Apr 2020 13:11:09 +0000 (14:11 +0100)
committerJonathan Coe <jbcoe@google.com>
Tue, 28 Apr 2020 13:11:09 +0000 (14:11 +0100)
commit44ad58b9915d29eb48be4f89368be6d30d174825
tree8bd4fc3522c878a068c9d280c315d7c7582355ff
parent476ba8127bfa4553bf5ce1654cd844803e8d6dea
[clang-format] Improved parser for C# properties

Summary:
Added some examples of properties from Microsoft documentation as test cases.

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties

Configuration support will be added in a follow up patch to address whether automatic properties are formatted as

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

or

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

Reviewers: krasimir, MyDeveloperDay

Reviewed By: krasimir

Subscribers: cfe-commits

Tags: #clang-format, #clang

Differential Revision: https://reviews.llvm.org/D78915
clang/lib/Format/UnwrappedLineParser.cpp
clang/unittests/Format/FormatTestCSharp.cpp