[PATCH] D58819: [clang-format] clang-format off/on not respected when using C Style comments
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 12:40:01 PST 2019
MyDeveloperDay marked an inline comment as done.
MyDeveloperDay added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:1792
+ else if (Trimmed == "// clang-format on" ||
+ Trimmed == "/* clang-format on */")
FormattingOff = false;
----------------
JonasToth wrote:
> Should we allow
> ```
> /* clang-format off
> It is just horrible for this piece of code. */
> ```
>
> ? Multiline-comments could span multiple lines and to deactivates clang-format and give reasons.
initially that is kind of what I was trying to do, but if you look over in TokenLexer where its turned off for styling they check only for a single line
So to be honest if we are going to change it we should change it in both places, but perhaps that is just overkill.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58819/new/
https://reviews.llvm.org/D58819
More information about the cfe-commits
mailing list