[PATCH] D148467: [clang-format] Add a new AfterCSharpProperty to BraceWrapping

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 08:08:46 PDT 2023


MyDeveloperDay planned changes to this revision.
MyDeveloperDay added a comment.

There is another case I need to cover

  Style.BraceWrapping.AfterCSharpProperty = false;
  Style.AllowShortCSharpPropertiesOnASingleLine = false;
  Style.AlwaysBreakBetweenShortCSharpProperties = false;
  Style.BraceWrapping.AfterFunction = true;
  
  verifyFormat("class A\n"
                 "{\n"
                 "    string Bar1\n"
                 "    {\n"
                 "        set; get;\n"
                 "    }\n"
                 "}",
                 Style);

This is currently formatting as

  class A
  {
      string Bar1 
      { set; get; }
  }

which doesn't feel quite right.



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:21
 #include "llvm/Support/Debug.h"
+#include <sal.h>
 
----------------
HazardyKnusperkeks wrote:
> What is this?
huh! I've no idea? where did that come from?


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

https://reviews.llvm.org/D148467



More information about the cfe-commits mailing list