[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

Francois JEAN via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 14 07:51:06 PDT 2021


Wawha added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3760
-      (isAllmanBraceIncludedBreakableLambda(Left, ShortLambdaOption) ||
-       isAllmanBraceIncludedBreakableLambda(Right, ShortLambdaOption))) {
-    return true;
----------------
Without this code, you should be able to remove functions isAllmanBraceIncludedBreakableLambda(), isItAInlineLambdaAllowed() and isOneChildWithoutMustBreakBefore().

Thank you for the fix.

When I implement that part, I have some difficulty to handle inline lambda and BreakBeforeLambdaBody. At the beginning, I implement the solution without inline lambda option (not yet present). But I have to handle it before merging the patch. And, this modification was added at this moment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104222



More information about the cfe-commits mailing list