[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 22 03:11:02 PDT 2025


================
@@ -4667,6 +4667,16 @@ struct FormatStyle {
   /// \version 7
   bool SpaceBeforeInheritanceColon;
 
+  /// If ``false``, spaces will be removed between underscore and an opening
+  /// parenthesis. This is specifically for the gettext macro ``_()`` commonly
+  /// used in GNU projects.
+  /// \code
+  ///    true:                                  false:
+  ///    _ (message);                   vs.     _(message);
+  /// \endcode
+  /// \version 19
+  bool SpaceBetweenUnderscoreParens;
----------------
HazardyKnusperkeks wrote:

Please resort.

https://github.com/llvm/llvm-project/pull/159925


More information about the cfe-commits mailing list