[PATCH] D104096: [Clang-Format] Add ReferenceAlignment directive

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 12 02:58:38 PDT 2021


MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang/include/clang/Format/Format.h:2647
 
-  /// The ``&`` and ``*`` alignment style.
+  /// The ``&``, ``&&`` and ``*`` alignment style.
   enum PointerAlignmentStyle : unsigned char {
----------------
nice catch!


================
Comment at: clang/lib/Format/Format.cpp:678
     IO.mapOptional("PointerAlignment", Style.PointerAlignment);
+    IO.mapOptional("ReferenceAlignment", Style.ReferenceAlignment);
     IO.mapOptional("PPIndentWidth", Style.PPIndentWidth);
----------------
Nit: so normally these would be alphabetic, totally understand why you would put them together but I think we should probably follow convention and put Reference type after RawStringFormats


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104096



More information about the cfe-commits mailing list