This is an archive of the discontinued LLVM Phabricator instance.

clang-format][NFC] Refactor UnwrappedLineParser::parseBlock()
ClosedPublic

Authored by owenpan on May 25 2022, 1:02 AM.

Diff Detail

Event Timeline

owenpan created this revision.May 25 2022, 1:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 1:02 AM
owenpan requested review of this revision.May 25 2022, 1:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 1:02 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
curdeius added inline comments.May 25 2022, 4:11 AM
clang/lib/Format/UnwrappedLineParser.cpp
874–876

Are there many captures here? Wouldn't it be better to be explicit and/or capture by ref? Do we need a mutable lambda?

owenpan added inline comments.May 25 2022, 11:28 AM
clang/lib/Format/UnwrappedLineParser.cpp
874–876

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.

curdeius accepted this revision.May 25 2022, 11:30 AM

LGTM.

clang/lib/Format/UnwrappedLineParser.cpp
874–876

Ok. Thanks.

This revision is now accepted and ready to land.May 25 2022, 11:30 AM