[clang] [clang-format] Option to insert spaces before the closing `*/` (PR #162105)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 8 10:28:50 PDT 2025


================
@@ -4684,6 +4684,15 @@ struct FormatStyle {
   /// \version 17
   bool SpaceBeforeJsonColon;
 
+  /// If ``true``, a space is inserted immediately before the closing ``*/`` in
+  /// block comments that contain content.
+  /// \code
+  ///    true:                                  false:
+  ///    /* comment */                  vs.     /* comment*/
----------------
mydeveloperday wrote:

I think we want options to handle this differently.

```c++
foo(/*bar=*/true);
```

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


More information about the cfe-commits mailing list