[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 04:19:03 PDT 2023


MyDeveloperDay added inline comments.


================
Comment at: clang/include/clang/Format/Format.h:949
+  /// If unset, ``ContinuationIndentWidth`` is used.
+  /// \code
+  ///   AlignAfterOpenBracket: AlwaysBreak
----------------
did you check generating the html from the rst? I can never remember if we need a newline before the \code


================
Comment at: clang/include/clang/Format/Format.h:4289
            DerivePointerAlignment == R.DerivePointerAlignment &&
+           BracedInitializerIndentWidth == R.BracedInitializerIndentWidth &&
            DisableFormat == R.DisableFormat &&
----------------
can this be alphabetic


================
Comment at: clang/lib/Format/Format.cpp:905
     IO.mapOptional("DerivePointerAlignment", Style.DerivePointerAlignment);
+    IO.mapOptional("BracedInitializerIndentWidth",
+                   Style.BracedInitializerIndentWidth);
----------------
also alphabetic


================
Comment at: clang/lib/Format/Format.cpp:1373
   LLVMStyle.DerivePointerAlignment = false;
+  LLVMStyle.BracedInitializerIndentWidth = std::nullopt;
   LLVMStyle.DisableFormat = false;
----------------
ditto alphabetic


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146101



More information about the cfe-commits mailing list