MyDeveloperDay added a comment.

Looks almost there, just a few nits really


================
Comment at: clang/docs/ClangFormatStyleOptions.rst:2316
 
+**ReferenceAlignment** (``ReferenceAlignmentStyle``)
+  Reference alignment style (overrides ``PointerAlignment`` for
----------------
Did you generate this file by running clang/doc/tools/dump_style.py or make it 
by hand? changes in Format.h should make some sort of change here


================
Comment at: clang/include/clang/Format/Format.h:1891
 
-  /// The ``&`` and ``*`` alignment style.
+  /// The ``&``, ``&&`` and ``*`` alignment style.
   enum PointerAlignmentStyle {
----------------
wondering why this didn't cause an rst change above


================
Comment at: clang/lib/Format/Format.cpp:993
   GoogleStyle.PointerAlignment = FormatStyle::PAS_Left;
+  GoogleStyle.ReferenceAlignment = FormatStyle::RAS_Pointer;
   GoogleStyle.RawStringFormats = {
----------------
I sort of feel you only need this in the base LLVMStyle?


================
Comment at: clang/lib/Format/Format.cpp:1185
   MozillaStyle.PointerAlignment = FormatStyle::PAS_Left;
+  MozillaStyle.ReferenceAlignment = FormatStyle::RAS_Pointer;
   MozillaStyle.SpaceAfterTemplateKeyword = false;
----------------
I sort of feel you only need this in the base LLVMStyle?


================
Comment at: clang/lib/Format/Format.cpp:1208
   Style.PointerAlignment = FormatStyle::PAS_Left;
+  Style.ReferenceAlignment = FormatStyle::RAS_Pointer;
   Style.SpaceBeforeCpp11BracedList = true;
----------------
I sort of feel you only need this in the base LLVMStyle?


================
Comment at: clang/lib/Format/TokenAnnotator.h:192
 
+  FormatStyle::PointerAlignmentStyle
+  getTokenPointerAlignment(const FormatToken &PointerOrReference);
----------------
do you need FormatStyle:: here?


================
Comment at: clang/unittests/Format/FormatTest.cpp:889
+  FormatStyle Style = getLLVMStyle();
+  Style.PointerAlignment = FormatStyle::PAS_Left;
+  Style.ReferenceAlignment = FormatStyle::RAS_Pointer;
----------------
you shouldn't need these right, lets test the default LLVM style without 
setting it to something else


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90238

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D90238: [clang-form... MyDeveloperDay via Phabricator via cfe-commits

Reply via email to