Ensure that there are spaces around braces '{', '}'.
Ensure that there is a space before and after '=>'.
Ensure that 'async' and 'when' are considered as keywords when inserting spaces.
Paths
| Differential D75129
[clang-format] Special handling of spaces for C# code ClosedPublic Authored by jbcoe on Feb 25 2020, 9:45 AM.
Details Summary Ensure that there are spaces around braces '{', '}'. Ensure that there is a space before and after '=>'. Ensure that 'async' and 'when' are considered as keywords when inserting spaces.
Diff Detail Event TimelineComment Actions As a general comment, we should consider which of these special cases can already be simulated by a combination of existing style options:
krasimir added inline comments.
This revision is now accepted and ready to land.Feb 26 2020, 6:44 AM Closed by commit rGe8c5fea243ce: [clang-format] Special handling of spaces for C# code (authored by Jonathan Coe <jbcoe@google.com>). · Explain WhyFeb 26 2020, 7:35 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 246689 clang/lib/Format/FormatToken.h
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestCSharp.cpp
|
Move this to the already existing } else if (Style.isCSharp()) { on line 2902 below.