[PATCH] D78982: [clang-format] Fix Microsoft style for C++ enums

Aaron Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 29 07:28:27 PDT 2020


asmith marked 6 inline comments as done.
asmith added a comment.

The is done unless there are other comments.



================
Comment at: clang/docs/ClangFormatStyleOptions.rst:721
-
-**InsertTrailingCommas** (``TrailingCommaStyle``) can be set to ``TCS_Wrapped``
-  to insert trailing commas in container literals (arrays and objects) that wrap
----------------
MyDeveloperDay wrote:
> ? are you removing something?
These are changes from running the python script to regenerate the docs. Someone forgot to run the script. This info is no longer in the header.


================
Comment at: clang/docs/ClangFormatStyleOptions.rst:2062
      {
-         [self.test1 t:self w:self callback:^(typeof(self) self, NSNumber *u, NSNumber *v) {
+         [self.test1 t:self w:self callback:^(typeof(self) self, NSNumber
+         *u, NSNumber *v) {
----------------
MyDeveloperDay wrote:
> unrelated change
Not my change. The column is too long so looks like someone manually edited the file.


================
Comment at: clang/lib/Format/Format.cpp:1143
   Style.PenaltyReturnTypeOnItsOwnLine = 1000;
+  Style.AllowShortEnumsOnASingleLine = (Language != FormatStyle::LK_Cpp);
   Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
----------------
MyDeveloperDay wrote:
> I think its ok to leave it was, just if up the unit tests
> 
> (the fact you didn't see this suggests you are not running the unit tests please ensure you are)
You need to use the latest changes. The is only applied when the style is Msft and C++. See the GetMicrosoftStyle() method.


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

https://reviews.llvm.org/D78982





More information about the cfe-commits mailing list