[clang] [clang-format] Add `SpacesInComments` option to control spacing around `/* */` (PR #162105)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 13 13:40:03 PST 2025


================
@@ -23,6 +23,18 @@
 namespace clang {
 namespace format {
 
+namespace {
+
+CommentKind classifyBlockComment(StringRef Text) {
+  if (Text.starts_with("/**") || Text.starts_with("/*!"))
+    return CommentKind::DocString;
+  const StringRef Content = Text.drop_front(2).drop_back(2).trim();
+  if (Content.ends_with('='))
+    return CommentKind::Parameter;
----------------
HazardyKnusperkeks wrote:

Okay, I actually meant the user facing documentation.

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


More information about the cfe-commits mailing list