[clang] 42e4045 - [clang-format][doc] Add GNU style link in KeepFormFeed option (#176654)

via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 7 12:02:00 PST 2026


Author: Baranov Victor
Date: 2026-02-07T12:01:55-08:00
New Revision: 42e404512bdde804e6440004e41d990aaff02640

URL: https://github.com/llvm/llvm-project/commit/42e404512bdde804e6440004e41d990aaff02640
DIFF: https://github.com/llvm/llvm-project/commit/42e404512bdde804e6440004e41d990aaff02640.diff

LOG: [clang-format][doc] Add GNU style link in KeepFormFeed option (#176654)

It was not clear from the description what this option does.
Added small example to demostrate its behavior.

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 5ba117c231ad5..378a0c591d747 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -5015,7 +5015,8 @@ the configuration (without a prefix: ``Auto``).
   Keep the form feed character if it's immediately preceded and followed by
   a newline. Multiple form feeds and newlines within a whitespace range are
   replaced with a single newline and form feed followed by the remaining
-  newlines.
+  newlines. (See
+  www.gnu.org/prep/standards/html_node/Formatting.html#:~:text=formfeed.)
 
 .. _LambdaBodyIndentation:
 

diff  --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h
index 43bea4b80cb8a..57ae14304b969 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -3520,7 +3520,8 @@ struct FormatStyle {
   /// Keep the form feed character if it's immediately preceded and followed by
   /// a newline. Multiple form feeds and newlines within a whitespace range are
   /// replaced with a single newline and form feed followed by the remaining
-  /// newlines.
+  /// newlines. (See
+  /// www.gnu.org/prep/standards/html_node/Formatting.html#:~:text=formfeed.)
   /// \version 20
   bool KeepFormFeed;
 


        


More information about the cfe-commits mailing list