[PATCH] D69951: [clang-format] NFC allow Format.h to be clang-formatted but still maintain the same doc layout in ClangFormatStyleOptions.rst
Mitchell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 06:43:58 PST 2019
mitchell-stellar added inline comments.
================
Comment at: clang/include/clang/Format/Format.h:1309
+ // clang-format off
/// Indent case labels one level from the switch statement.
----------------
MyDeveloperDay wrote:
> mitchell-stellar wrote:
> > Can this documentation be formatted in a way that avoids clang-format reformatting it? It doesn't look like it depends on long lines like the other bits in this change.
> It's this line..
>
> it turns:
>
> ```
> When ``false``, use the same indentation level as for the switch statement.
> Switch statement body is always indented one level more than case labels.
> ```
>
> into:
>
> ```
> When ``false``, use the same indentation level as for the switch
> statement. Switch statement body is always indented one level more than
> case labels.
> ```
>
> My assumption was that the author wanted the "Switch statement.." to be a new paragraph, but if we don't mind then we could lose this one
The HTML is no different. If the author wanted a separate paragraph, I suspect that person would have used two line breaks. I would reformat this one and remove the clang-format switches.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69951/new/
https://reviews.llvm.org/D69951
More information about the cfe-commits
mailing list