[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
Sat Dec 4 12:22:04 PST 2021
HazardyKnusperkeks updated this revision to Diff 391857.
HazardyKnusperkeks marked 2 inline comments as done.
HazardyKnusperkeks added a comment.
Incorporated feedback.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115069/new/
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
@@ -1290,10 +1290,9 @@
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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115069.391857.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211204/6fae292e/attachment.bin>
More information about the cfe-commits
mailing list