[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 27 23:27:00 PST 2021


curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks for working on this.



================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2967
+  // needs to be indented.
+  bool ClosesBlock =
+      Line->MatchingOpeningBlockLineIndex != UnwrappedLine::kInvalidIndex &&
----------------
timwoj wrote:
> curdeius wrote:
> > Please move below to the place of use. Also, just naming it `ClosesBlock` is a bit misleading as it is only for Whitesmiths style.
> I agree with renaming it, but I'm not sure on moving it to where it's used. It relies on `Line->MatchingOpeningBlockLineIndex` which is reset shortly after this boolean value is calculated.
Right. I've overseen it. It's good now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94500/new/

https://reviews.llvm.org/D94500



More information about the cfe-commits mailing list