[PATCH] D58819: [clang-format] clang-format off/on not respected when using C Style comments
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 12:43:03 PST 2019
JonasToth 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.
Totally, not necessary in my eyes, nice plus, so dont implement it :D
CHANGES SINCE LAST ACTION
More information about the cfe-commits