[PATCH] D115069: [clang-format][NFC] Merge another two calls to isOneOf

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 3 12:49:17 PST 2021


curdeius added inline comments.


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:1294-1296
+      Previous->isOneOf(tok::l_paren, tok::comma, tok::colon, TT_BinaryOperator,
+                        TT_ConditionalExpr) &&
       !Previous->isOneOf(TT_DictLiteral, TT_ObjCMethodExpr)) {
----------------
Unrelated to your change, it only shed light on this:
This condition looks strange to me. How can `Previous` be at the same time two different `TokenType`s (?), for instance, both `TT_BinaryOperator` and `TT_DictLiteral`?

Shouldn't it be this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115069



More information about the cfe-commits mailing list