Author: Björn Schäpers
Date: 2022-01-03T23:06:55+01:00
New Revision: d48d1f8ee84577a1ca38d4fe03956ee27884e399

URL: 
https://github.com/llvm/llvm-project/commit/d48d1f8ee84577a1ca38d4fe03956ee27884e399
DIFF: 
https://github.com/llvm/llvm-project/commit/d48d1f8ee84577a1ca38d4fe03956ee27884e399.diff

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

Differential Revision: https://reviews.llvm.org/D115069

Added: 
    

Modified: 
    clang/lib/Format/ContinuationIndenter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/ContinuationIndenter.cpp 
b/clang/lib/Format/ContinuationIndenter.cpp
index 4225d6b67b0e..31f5de673362 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -1288,10 +1288,9 @@ unsigned 
ContinuationIndenter::moveStateToNextToken(LineState &State,
         State.Stack[i].NoLineBreak = true;
     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(TT_DictLiteral, TT_ObjCMethodExpr)) {
+  if (Previous && (Previous->isOneOf(TT_BinaryOperator, TT_ConditionalExpr) ||
+                   (Previous->isOneOf(tok::l_paren, tok::comma, tok::colon) &&
+                    !Previous->isOneOf(TT_DictLiteral, TT_ObjCMethodExpr)))) {
     State.Stack.back().NestedBlockInlined =
         !Newline && hasNestedBlockInlined(Previous, Current, Style);
   }


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to