[PATCH] D126358: clang-format][NFC] Refactor UnwrappedLineParser::parseBlock()
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 25 11:30:30 PDT 2022
curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:874
- if (SimpleBlock && !KeepBraces) {
+ auto RemoveBraces = [=]() mutable {
+ if (KeepBraces || !SimpleBlock)
----------------
owenpan wrote:
> curdeius wrote:
> > Are there many captures here? Wouldn't it be better to be explicit and/or capture by ref? Do we need a mutable lambda?
> Yes, too many to be explicit for me. They are all integrals/pointers, a couple of which are modified in the lambda, hence by copy and mutable.
Ok. Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126358/new/
https://reviews.llvm.org/D126358
More information about the cfe-commits
mailing list