[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 23 02:18:27 PDT 2020


curdeius added subscribers: MyDeveloperDay, curdeius.
curdeius added a comment.

Hi,
I know it's an old revision, but I confirm that it provoked the bug https://bugs.llvm.org/show_bug.cgi?id=45141.
The problem is in the `TokenAnnotator::mustBreakBefore` as @jaafar pointed out:

  if (!Next->isOneOf(TT_LambdaLSquare, tok::l_brace, tok::caret))
    return true; // << HERE

It should return false if everything fits on a single line.
I'm not sure how to check this though.
@MyDeveloperDay, would you have an idea?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D52676



More information about the cfe-commits mailing list