Skip to content

Commit

Permalink
[clang-format][NFC] Simplify the logic in a return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
owenca committed Oct 22, 2023
1 parent f3ff0a6 commit 3e86cc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clang/lib/Format/TokenAnnotator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4197,8 +4197,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
if ((Left.is(tok::l_brace) && Left.isNot(BK_Block)) ||
(Right.is(tok::r_brace) && Right.MatchingParen &&
Right.MatchingParen->isNot(BK_Block))) {
return Style.Cpp11BracedListStyle ? Style.SpacesInParensOptions.Other
: true;
return !Style.Cpp11BracedListStyle || Style.SpacesInParensOptions.Other;
}
if (Left.is(TT_BlockComment)) {
// No whitespace in x(/*foo=*/1), except for JavaScript.
Expand Down

0 comments on commit 3e86cc4

Please sign in to comment.