[PATCH] D152443: Add SpaceAfterOperatorKeyword style option for clang-format

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 14:51:25 PDT 2023


HazardyKnusperkeks added a comment.

Can you add a note to the release notes also please?



================
Comment at: clang/include/clang/Format/Format.h:3709
+  /// \version 17
+  bool SpaceAfterOperatorKeyword;
+
----------------
O before T, please resort.


================
Comment at: clang/lib/Format/Format.cpp:1737
   MozillaStyle.SpaceAfterTemplateKeyword = false;
+  MozillaStyle.SpaceAfterOperatorKeyword = false;
   return MozillaStyle;
----------------
Not needed, it is initially created with LLVMStyle and then only modified.


================
Comment at: clang/unittests/Format/FormatTest.cpp:22917
+  Style.SpaceAfterOperatorKeyword = true;
+  verifyFormat("bool operator ==();", Style);
 }
----------------
Please also use a test case with a call to an operator.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152443



More information about the cfe-commits mailing list