[PATCH] D90949: [clang-format] avoid introducing multiline comments
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 9 03:03:11 PST 2020
sammccall accepted this revision.
sammccall added a comment.
Still LG
================
Comment at: clang/lib/Format/BreakableToken.cpp:109
+ // after '\'.
+ if (Style.isCpp()) {
+ StringRef::size_type LastNonBlank =
----------------
krasimir wrote:
> sammccall wrote:
> > Do we really want to predicate this on isCpp()? `//` comments are allowed by C99.
> > Even if the warning only applies to C++ for some reason, the reasons for confusion do not.
> I think in Java and other non-C++-y languages, an `\` at the end of a line-comment line does not have any special meaning, hence I didn't want it to trigger in those cases.
Sigh, I guess I forgot what isCpp() means again... :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90949/new/
https://reviews.llvm.org/D90949
More information about the cfe-commits
mailing list