<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/113170>113170</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
             [feature-request] [clang-format] Preserve the form feed character (^L, 0xC, \f)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Gleefre
      </td>
    </tr>
</table>

<pre>
    The form feed character is often used to divide programs into logical blocks. When placed alone on a line, it acts as a logical page break, which can be used by text editors for efficient navigation and various display features. For example, Emacs has commands like `narrow-to-page` and `forward-page` / `backward-page`, and Vim also recognizes the ^L markers for navigation. Additionally, various IDE extensions provide similar functionality.

Although formfeeds are mostly used in lisp code, they also can be found in C/C++ code. Here's a quote from the [GNU coding standards](https://www.gnu.org/prep/standards/standards.html#index-formfeed) (gcc's code style):
> Please use formfeed characters (control-L) to divide the program into pages at logical places (but not within a function). It does not matter just how long the pages are, since they do not have to fit on a printed page. The formfeeds should appear alone on lines by themselves. 

Currently, `clang-format` removes form feed characters that appear alone on a line, and to my knowledge there is no option to disable this behavior. It would be great either if formfeeds were always preserved or if there was an configuration option to control that.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVUtv2zoT_TX0ZmBBpqwkXmiRl_sVKD50cR_rETmSWFOkSo6s-P76C1JOneB2kwjMvM6ccyYYo-kdUSPqJ1G_bHDmwYfmiyXqAm1ary_NHwNB58MIHZEGNWBAxRTARPAdk4M5kgb2oM3ZaIIp-D7gGME49mB9bxRaaK1Xp1jA3wM5mCwq0oDWOwLvAMEaR0I-g2FAxREwpsdr7oQ9QRsITylkGYwaQKGDltbe7QWY3hhIG_YhpmmBus4oQ47B4dn0yCb1cRrOGIyfI2gTJ4sX6Ah5DhQLOKa0Nxwnm0d5HVFFGDCC8uOITkew5kQg7kqHIfhly36bRhN3Za4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