[PATCH] D119649: [clang-format] Correctly format loops and `if` statements even if preceded with comments.
sstwcw via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 12 13:47:20 PST 2022
sstwcw added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:379
if (NextLine.First->is(tok::l_brace)) {
if ((TheLine->First->isOneOf(tok::kw_if, tok::kw_else, tok::kw_while,
tok::kw_for, tok::kw_switch, tok::kw_try,
----------------
Why not use `FirstNonComment` instead of `TheLine->First` down here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119649/new/
https://reviews.llvm.org/D119649
More information about the cfe-commits
mailing list