[PATCH] D137762: [clang-format] avoid breaking )( with BlockIndent

Gedare Bloom via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 11 14:24:35 PST 2022


gedare marked 2 inline comments as done.
gedare added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:5006-5010
+    return !((Previous && (Previous->is(tok::kw_for) || Previous->isIf())) ||
+             (Right.Next &&
+              (Right.Next->is(tok::l_paren) ||
+               (Right.Next->is(tok::r_paren) &&
+                (Right.NestingLevel == 0 || Previous->is(tok::star))))));
----------------
HazardyKnusperkeks wrote:
> This is horrible to read.
> 
> Could you split this into multiple statements? Maybe with lambdas, I don't know.
> 
> But I have no intention to ever understand that condition.
Sure. I was just following the prevailing style in this code base. I'll refactor.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137762



More information about the cfe-commits mailing list