Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
#
ffb48d48 |
| 29-May-2021 |
mydeveloperday <mydeveloperday@gmail.com> |
[clang-format] successive C# attributes cause line breaking issues
{D74265} reduced the aggressiveness of line breaking following C# attributes, however this change removed any support for attribute
[clang-format] successive C# attributes cause line breaking issues
{D74265} reduced the aggressiveness of line breaking following C# attributes, however this change removed any support for attributes on properties, causing significant ugliness to be introduced.
This revision goes some way to addressing that by re-introducing the more aggressive check to `mustBreakBefore()`, but constraining it to the most common cases where we use properties which should not impact the "caller info attributes" or the "[In , Out]" decorations that are normally put on pinvoke
It does not address my additional concerns of the original change regarding multiple C# attributes, as these are somewhat incorrectly handled by virtue of the fact its not recognising the second attribute as an attribute at all. But instead thinking its an array.
The purpose of this revision is to get back to where we were for the most common of cases as a stepping stone to resolving this. However {D74265} has broken a lot of C# code and this revision will go someway alone to addressing the majority.
Reviewed By: jbcoe, HazardyKnusperkeks, curdeius
Differential Revision: https://reviews.llvm.org/D103307
show more ...
|
Revision tags: llvmorg-12.0.1-rc1 |
|
#
ec725b30 |
| 06-May-2021 |
Eliza Velasquez <exv@google.com> |
[clang-format] Fix C# nullable-related errors
This fixes two errors:
Previously, clang-format was splitting up type identifiers from the nullable ?. This changes this behavior so that the type name
[clang-format] Fix C# nullable-related errors
This fixes two errors:
Previously, clang-format was splitting up type identifiers from the nullable ?. This changes this behavior so that the type name sticks with the operator.
Additionally, nullable operators attached to return types in interface functions were not parsed correctly. Digging deeper, it looks like interface bodies were being parsed differently than classes and structs, causing MustBeDeclaration to be incorrect for interface members. They now share the same logic.
One other change is reintroducing the CSharpNullable type independent of JsTypeOptionalQuestion. Despite having a similar semantic purpose, their actual syntax differs quite a bit.
Reviewed By: MyDeveloperDay, curdeius
Differential Revision: https://reviews.llvm.org/D101860
show more ...
|
#
a437befa |
| 06-May-2021 |
Eliza Velasquez <exv@google.com> |
[clang-format] Add more support for C# 8 nullables
This adds support for the null-coalescing assignment and null-forgiving operators.
https://docs.microsoft.com/en-us/dotnet/csharp/language-referen
[clang-format] Add more support for C# 8 nullables
This adds support for the null-coalescing assignment and null-forgiving operators.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-coalescing-operator
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-forgiving
Reviewed By: krasimir, curdeius
Differential Revision: https://reviews.llvm.org/D101702
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
#
00dc97f1 |
| 17-Jan-2021 |
mydeveloperday <mydeveloperday@gmail.com> |
[clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates
https://bugs.llvm.org/show_bug.cgi?id=48594
Empty or small templates were not being treated the same way as small classe
[clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates
https://bugs.llvm.org/show_bug.cgi?id=48594
Empty or small templates were not being treated the same way as small classes especially when SplitEmptyRecord was set to true
This revision aims to help this by identifying a case when we should try not to merge the lines together
Reviewed By: curdeius, JohelEGP
Differential Revision: https://reviews.llvm.org/D93839
show more ...
|
Revision tags: llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
a16e4a63 |
| 18-Sep-2020 |
mydeveloperday <mydeveloperday@gmail.com> |
[clang-format] NFC ensure the clang-format tests remain clang-formatted
|
Revision tags: llvmorg-11.0.0-rc2 |
|
#
5f104a80 |
| 10-Aug-2020 |
Łukasz Krawczyk <lukaszkrawczyk@google.com> |
[clang-format] Add space between method modifier and a tuple return type in C#
"public (string name, int age) methodTuple() {}" is now properly spaced
Patch by lukaszkrawczyk@google.com
Reviewed B
[clang-format] Add space between method modifier and a tuple return type in C#
"public (string name, int age) methodTuple() {}" is now properly spaced
Patch by lukaszkrawczyk@google.com
Reviewed By: jbcoe, krasimir
Differential Revision: https://reviews.llvm.org/D85016
show more ...
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
f22b0727 |
| 09-Jun-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Microsoft style fixes for C# properties
Summary: There should be no line break before the opening brace for Microsoft style property accessors when the accessor is a simple `{ get; se
[clang-format] Microsoft style fixes for C# properties
Summary: There should be no line break before the opening brace for Microsoft style property accessors when the accessor is a simple `{ get; set }`.
https://docs.microsoft.com/en-us/dotnet/csharp/properties
Reviewers: krasimir, MyDeveloperDay
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D81467
show more ...
|
#
7117066b |
| 08-Jun-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Brace breaking for C# lambdas
Reviewers: krasimir, MyDeveloperDay
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews
[clang-format] Brace breaking for C# lambdas
Reviewers: krasimir, MyDeveloperDay
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D81394
show more ...
|
#
a6794991 |
| 05-Jun-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] treat 'lock' as a keyword for C# code
Summary: This will put a space in `lock (process)` when spaces are required after keywords.
Reviewers: krasimir
Reviewed By: krasimir
Subscrib
[clang-format] treat 'lock' as a keyword for C# code
Summary: This will put a space in `lock (process)` when spaces are required after keywords.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D81255
show more ...
|
#
9520bf14 |
| 04-Jun-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide
Summary: Google's C# style guide is at https://google.github.io/styleguide/csharp-style.html
Reviewers: krasi
[clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide
Summary: Google's C# style guide is at https://google.github.io/styleguide/csharp-style.html
Reviewers: krasimir, MyDeveloperDay, sammccall
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits, klimek
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D79715
show more ...
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
8fa743ab |
| 15-May-2020 |
Jonathan Coe <jbcoe@google.com> |
[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
[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
show more ...
|
#
047898c9 |
| 05-May-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] C# always regards && as a binary operator
Reviewers: krasimir, MyDeveloperDay
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revisio
[clang-format] C# always regards && as a binary operator
Reviewers: krasimir, MyDeveloperDay
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D79414
show more ...
|
#
ece7e95f |
| 02-May-2020 |
mydeveloperday <mydeveloperday@gmail.com> |
[clang-format] NFC - clang-format the FormatTests
Summary: Ensure the clang-format unit tests are themselves clang-formatted
Having areas of the llvm code which are clang-format clean, give us more
[clang-format] NFC - clang-format the FormatTests
Summary: Ensure the clang-format unit tests are themselves clang-formatted
Having areas of the llvm code which are clang-format clean, give us more areas to run new clang-format binaries on ensuring we haven't broken anything.
It seems to me we SHOULD have this clang-formatted at a minimum, otherwise how can we expect others to use clang-format if we "don't eat our own dogfood", also if the tests are dependent on the formatting of the code then that would also be bad!
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79204
show more ...
|
#
292058a5 |
| 30-Apr-2020 |
Aaron Smith <aaron.smith@microsoft.com> |
[clang-format] Fix Microsoft style for enums
Summary: Before this change enums were formatted incorrectly for the Microsoft style.
[C++ Example]
enum { one, two } three, four;
[clang-format] Fix Microsoft style for enums
Summary: Before this change enums were formatted incorrectly for the Microsoft style.
[C++ Example]
enum { one, two } three, four;
[Incorrectly Formatted]
enum { one, two } three, four;
[Correct Format with Patch]
enum { one, two } three, four;
Reviewers: jbcoe, MyDeveloperDay, rnk
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D78982
show more ...
|
#
85ee97fd |
| 28-Apr-2020 |
Jonathan Coe <jbcoe@google.com> |
Revert "[clang-format] C# property formatting can be controlled by config options"
Committed in error without approval https://reviews.llvm.org/D79000
This reverts commit 015bca3e67cbb88f74f01fb5ae
Revert "[clang-format] C# property formatting can be controlled by config options"
Committed in error without approval https://reviews.llvm.org/D79000
This reverts commit 015bca3e67cbb88f74f01fb5ae4e46392bec6416.
show more ...
|
#
015bca3e |
| 28-Apr-2020 |
Jonathan Coe <jbcoe@google.com> |
[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
[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 MS style to their old 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
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D79000
show more ...
|
#
7443f86e |
| 28-Apr-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] insert space after C# keyword var in var (key, value)
Reviewers: krasimir, MyDeveloperDay
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differen
[clang-format] insert space after C# keyword var in var (key, value)
Reviewers: krasimir, MyDeveloperDay
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D79008
show more ...
|
#
44ad58b9 |
| 28-Apr-2020 |
Jonathan Coe <jbcoe@google.com> |
[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-gu
[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
show more ...
|
#
2f9fc8d9 |
| 23-Apr-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Handle C# property accessors when parsing lines
Summary: Improve C# `{ get; set; } = default;` formatting by handling it in the UnwrappedLineParser rather than trying to merge lines l
[clang-format] Handle C# property accessors when parsing lines
Summary: Improve C# `{ get; set; } = default;` formatting by handling it in the UnwrappedLineParser rather than trying to merge lines later.
Remove old logic to merge lines.
Update tests as formatting output has changed (as intended).
Reviewers: krasimir, MyDeveloperDay
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D78642
show more ...
|
#
07c1978b |
| 16-Apr-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Do not interpret C# deconstruction in a foreach as a cast
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differenti
[clang-format] Do not interpret C# deconstruction in a foreach as a cast
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D78295
show more ...
|
#
d1b412ae |
| 31-Mar-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Correct line breaks in C# generic type constraints
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://re
[clang-format] Correct line breaks in C# generic type constraints
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D77064
show more ...
|
#
0574030c |
| 30-Mar-2020 |
Krasimir Georgiev <krasimir@google.com> |
[clang-format] only parse C# generic type constraints in C#
Commit "[clang-format] Handle C# generic type constraints", https://github.com/llvm/llvm-project/commit/dcbcec4822f47ec5b638dd9c20dcebd464
[clang-format] only parse C# generic type constraints in C#
Commit "[clang-format] Handle C# generic type constraints", https://github.com/llvm/llvm-project/commit/dcbcec4822f47ec5b638dd9c20dcebd464569dae regressed the formatting of code containing `where` as an identifier in other languages.
show more ...
|
#
04336ada |
| 23-Mar-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] No space inserted between commas in C#
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https:
[clang-format] No space inserted between commas in C#
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D76621
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6 |
|
#
5e1a026c |
| 23-Mar-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Do not indent C# array initialisers as continuations
Summary: Flag '= {' as a braced init list when parsing C# code.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-comm
[clang-format] Do not indent C# array initialisers as continuations
Summary: Flag '= {' as a braced init list when parsing C# code.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D75760
show more ...
|
#
78e2a3c6 |
| 23-Mar-2020 |
Jonathan Coe <jbcoe@google.com> |
[clang-format] Reflow long C# generic type constraints correctly
Summary: Align sequential generic type constraints on a type.
Indent sequential generic type constraints on different types as conti
[clang-format] Reflow long C# generic type constraints correctly
Summary: Align sequential generic type constraints on a type.
Indent sequential generic type constraints on different types as continuations.
Do not allow '(' and '<' within a generic type constraint to open new scopes.
Reviewers: krasimir
Subscribers: cfe-commits, MyDeveloperDay
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D76597
show more ...
|