aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/UnwrappedLineFormatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/UnwrappedLineFormatter.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineFormatter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp
index ac9d147..ac9c81d 100644
--- a/clang/lib/Format/UnwrappedLineFormatter.cpp
+++ b/clang/lib/Format/UnwrappedLineFormatter.cpp
@@ -506,7 +506,7 @@ private:
(NextLine.First->is(tok::r_brace) &&
!Style.BraceWrapping.SplitEmptyRecord);
} else if (TheLine->InPPDirective ||
- !TheLine->First->isOneOf(tok::kw_class, tok::kw_enum,
+ TheLine->First->isNoneOf(tok::kw_class, tok::kw_enum,
tok::kw_struct)) {
// Try to merge a block with left brace unwrapped that wasn't yet
// covered.
@@ -686,8 +686,8 @@ private:
}
Limit = limitConsideringMacros(I + 1, E, Limit);
AnnotatedLine &Line = **I;
- if (Line.First->isNot(tok::kw_do) && Line.First->isNot(tok::kw_else) &&
- Line.Last->isNot(tok::kw_else) && Line.Last->isNot(tok::r_paren)) {
+ if (Line.First->isNoneOf(tok::kw_do, tok::kw_else) &&
+ Line.Last->isNoneOf(tok::kw_else, tok::r_paren)) {
return 0;
}
// Only merge `do while` if `do` is the only statement on the line.