[clang] [clang-format][docs] Clarify AllowShortFunctionsOnASingleLine deprecation (PR #195491)

via cfe-commits cfe-commits at lists.llvm.org
Sat May 2 23:59:44 PDT 2026


https://github.com/nataliakokoromyti updated https://github.com/llvm/llvm-project/pull/195491

>From ad3f57d66a8343df37ebe9717f21e67e8642a010 Mon Sep 17 00:00:00 2001
From: nataliakokoromyti <nataliakokoromyti at gmail.com>
Date: Sat, 2 May 2026 23:59:28 -0700
Subject: [PATCH] clarify inline deprecation

---
 clang/docs/ClangFormatStyleOptions.rst | 6 ++++++
 clang/include/clang/Format/Format.h    | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index fe8dfa406bc32..e57ab51313617 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -1976,6 +1976,12 @@ the configuration (without a prefix: ``Auto``).
       Inline: true
       Other: false
 
+
+  .. note::
+
+    The nested ``Inline`` flag here is not deprecated. Only the scalar
+    value ``AllowShortFunctionsOnASingleLine: Inline`` is deprecated.
+
   * ``bool Empty`` Merge top-level empty functions.
 
     .. code-block:: c++
diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index 6d0c508940881..738c1347ce450 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -893,6 +893,11 @@ struct FormatStyle {
   ///     Inline: true
   ///     Other: false
   /// \endcode
+  ///
+  /// \note
+  ///   The nested ``Inline`` flag here is not deprecated. Only the scalar
+  ///   value ``AllowShortFunctionsOnASingleLine: Inline`` is deprecated.
+  /// \endnote
   struct ShortFunctionStyle {
     /// Merge top-level empty functions.
     /// \code



More information about the cfe-commits mailing list