[clang] 3e86cc4 - [clang-format][NFC] Simplify the logic in a return statement
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 22 13:46:40 PDT 2023
Author: Owen Pan
Date: 2023-10-22T13:46:32-07:00
New Revision: 3e86cc4b864f609720c12cc97ff70a20aabb956f
URL: https://github.com/llvm/llvm-project/commit/3e86cc4b864f609720c12cc97ff70a20aabb956f
DIFF: https://github.com/llvm/llvm-project/commit/3e86cc4b864f609720c12cc97ff70a20aabb956f.diff
LOG: [clang-format][NFC] Simplify the logic in a return statement
Added:
Modified:
clang/lib/Format/TokenAnnotator.cpp
Removed:
################################################################################
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 7f85f48de2ed2ed..a457ced9f886846 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -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.
More information about the cfe-commits
mailing list