[clang] [clang-format][NFC] Improve KeepFormFeed option decription (PR #176654)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 23 20:11:54 PST 2026
================
@@ -3517,10 +3517,17 @@ struct FormatStyle {
/// \version 3.7
// bool KeepEmptyLinesAtTheStartOfBlocks;
- /// 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.
+ /// Keep the form feed character (``\f``) 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.
+ /// \code
+ /// false: true:
+ ///
+ /// "int i;\n" "int i;\n"
+ /// "\n" "\f\n"
+ /// "void f();" "void f();"
+ /// \endcode
----------------
owenca wrote:
Please leave the original description as is except adding the GNU link. (There is no point of just adding the `\f` to explain what a form feed character is as we don't do that for other whitespace characters.)
The code example is superfluous and not in the same format as other C/C++ snippets, which are not string literals in double quotes.
https://github.com/llvm/llvm-project/pull/176654
More information about the cfe-commits
mailing list