Skip to content

Commit

Permalink
[clang-format] Fix dropped 'else'.
Browse files Browse the repository at this point in the history
'else' was dropped accidentally in 398cddf.

Patch by Jared Grubb.

Differential revision: https://reviews.llvm.org/D146310
  • Loading branch information
r4nt committed Apr 21, 2023
1 parent c9083be commit 9e9e096
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clang/lib/Format/UnwrappedLineFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,9 @@ class LineJoiner {
ShouldMerge = !Style.BraceWrapping.AfterClass ||
(NextLine.First->is(tok::r_brace) &&
!Style.BraceWrapping.SplitEmptyRecord);
}
if (TheLine->InPPDirective ||
!TheLine->First->isOneOf(tok::kw_class, tok::kw_enum,
tok::kw_struct)) {
} else if (TheLine->InPPDirective ||
!TheLine->First->isOneOf(tok::kw_class, tok::kw_enum,
tok::kw_struct)) {
// Try to merge a block with left brace unwrapped that wasn't yet
// covered.
ShouldMerge = !Style.BraceWrapping.AfterFunction ||
Expand Down

0 comments on commit 9e9e096

Please sign in to comment.