Author: Owen Pan Date: 2026-03-23T21:46:44-07:00 New Revision: c1a45ffc84eee23c7c330ea16eb08e9cf8fd623e
URL: https://github.com/llvm/llvm-project/commit/c1a45ffc84eee23c7c330ea16eb08e9cf8fd623e DIFF: https://github.com/llvm/llvm-project/commit/c1a45ffc84eee23c7c330ea16eb08e9cf8fd623e.diff LOG: [clang-format][doc] Add a note to OneLineFormatOffRegex option Closes #184639 Added: Modified: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h Removed: ################################################################################ diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index 05ebb997a41ae..f637b81bb75bc 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -5799,6 +5799,11 @@ the configuration (without a prefix: ``Auto``). clang-format skips the comment and the next line. Otherwise, clang-format skips lines containing a matched token. + .. note:: + + This option does not apply to ``IntegerLiteralSeparator`` and + ``NumericLiteralCase``. + .. code-block:: c++ // OneLineFormatOffRegex: ^(// NOLINT|logger$) diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index e5bf3c08d350a..8c90cc2e98121 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -4200,6 +4200,10 @@ struct FormatStyle { /// one line. If it matches a comment that is the only token of a line, /// clang-format skips the comment and the next line. Otherwise, clang-format /// skips lines containing a matched token. + /// \note + /// This option does not apply to ``IntegerLiteralSeparator`` and + /// ``NumericLiteralCase``. + /// \endnote /// \code /// // OneLineFormatOffRegex: ^(// NOLINT|logger$) /// // results in the output below: _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
