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

via cfe-commits cfe-commits at lists.llvm.org
Sat May 2 16:24:24 PDT 2026


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

>From c4722c8231b3bde11f6d8a0c02b89a3906f08ebf Mon Sep 17 00:00:00 2001
From: nataliakokoromyti <nataliakokoromyti at gmail.com>
Date: Sat, 2 May 2026 15:27:50 -0700
Subject: [PATCH] clarify inline deprecation

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

diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst
index fe8dfa406bc32..94af3bb8f0dac 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -1976,6 +1976,9 @@ the configuration (without a prefix: ``Auto``).
       Inline: true
       Other: false
 
+    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..3bf3a8f876f75 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -893,6 +893,9 @@ struct FormatStyle {
   ///     Inline: true
   ///     Other: false
   /// \endcode
+  ///
+  ///   The nested ``Inline`` flag here is not deprecated. Only the scalar
+  ///   value ``AllowShortFunctionsOnASingleLine: Inline`` is deprecated.
   struct ShortFunctionStyle {
     /// Merge top-level empty functions.
     /// \code



More information about the cfe-commits mailing list