[all-commits] [llvm/llvm-project] cc0f33: [clang-format] Add SpacesInComments option for blo...

Frank via All-commits all-commits at lists.llvm.org
Thu Jul 30 13:49:42 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc0f33be52a5a04fd809d6e6e6e41c0af794283d
      https://github.com/llvm/llvm-project/commit/cc0f33be52a5a04fd809d6e6e6e41c0af794283d
  Author: Frank <147031176+frank-suwen at users.noreply.github.com>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.rst
    M clang/docs/ReleaseNotes.md
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/BreakableToken.cpp
    M clang/lib/Format/Format.cpp
    M clang/unittests/Format/ConfigParseTest.cpp
    M clang/unittests/Format/FormatTestComments.cpp

  Log Message:
  -----------
  [clang-format] Add SpacesInComments option for block comments (#204727)

Adds a new `SpacesInBlockComments` clang-format option to control
spacing after `/*` and before `*/` in ordinary block comments.

Supported values:

* Always: formats `/*comment*/` as `/* comment */`
* Never: formats `/* comment */` as `/*comment*/`
* Leave: preserves existing spacing

Documentation comments such as `/** ... */` and `/*! ... */`, and
parameter comments such as `/*Arg=*/`, are left unchanged.

Tests added for all option values, multiline block comments, and
excluded parameter/doc comments.

Addresses #160682



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list