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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 3 12:02:16 PST 2021


HazardyKnusperkeks created this revision.
HazardyKnusperkeks added reviewers: MyDeveloperDay, curdeius, owenpan.
HazardyKnusperkeks added a project: clang-format.
HazardyKnusperkeks requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115069

Files:
  clang/lib/Format/ContinuationIndenter.cpp


Index: clang/lib/Format/ContinuationIndenter.cpp
===================================================================
--- clang/lib/Format/ContinuationIndenter.cpp
+++ clang/lib/Format/ContinuationIndenter.cpp
@@ -1291,8 +1291,8 @@
     State.Stack[State.Stack.size() - 2].NestedBlockInlined = false;
   }
   if (Previous &&
-      (Previous->isOneOf(tok::l_paren, tok::comma, tok::colon) ||
-       Previous->isOneOf(TT_BinaryOperator, TT_ConditionalExpr)) &&
+      Previous->isOneOf(tok::l_paren, tok::comma, tok::colon, TT_BinaryOperator,
+                        TT_ConditionalExpr) &&
       !Previous->isOneOf(TT_DictLiteral, TT_ObjCMethodExpr)) {
     State.Stack.back().NestedBlockInlined =
         !Newline && hasNestedBlockInlined(Previous, Current, Style);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115069.391703.patch
Type: text/x-patch
Size: 769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211203/dcd69e16/attachment.bin>


More information about the cfe-commits mailing list