[clang] 554efc2 - [clang-format] Format unit tests with InsertBraces/RemoveBracesLLVM
via cfe-commits
cfe-commits at lists.llvm.org
Sat May 21 16:18:31 PDT 2022
Author: owenca
Date: 2022-05-21T16:13:35-07:00
New Revision: 554efc225217272df755a962d841d57056af83f4
URL: https://github.com/llvm/llvm-project/commit/554efc225217272df755a962d841d57056af83f4
DIFF: https://github.com/llvm/llvm-project/commit/554efc225217272df755a962d841d57056af83f4.diff
LOG: [clang-format] Format unit tests with InsertBraces/RemoveBracesLLVM
Added:
Modified:
clang/unittests/Format/DefinitionBlockSeparatorTest.cpp
clang/unittests/Format/FormatTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp b/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp
index cb24cc921bc0..45dd2fdc46b6 100644
--- a/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp
+++ b/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp
@@ -76,8 +76,9 @@ class DefinitionBlockSeparatorTest : public ::testing::Test {
if (Result.size()) {
auto LastChar = Result.back();
if ((Char == '\n' && LastChar == '\n') ||
- (Char == '\r' && (LastChar == '\r' || LastChar == '\n')))
+ (Char == '\r' && (LastChar == '\r' || LastChar == '\n'))) {
continue;
+ }
}
Result.push_back(Char);
}
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 83b8dbed75e3..3621ba667818 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -19609,7 +19609,8 @@ TEST_F(FormatTest, UnderstandPragmaRegion) {
auto Style = getLLVMStyleWithColumns(0);
verifyFormat("#pragma region TEST(FOO : BAR)", Style);
- EXPECT_EQ("#pragma region TEST(FOO : BAR)", format("#pragma region TEST(FOO : BAR)", Style));
+ EXPECT_EQ("#pragma region TEST(FOO : BAR)",
+ format("#pragma region TEST(FOO : BAR)", Style));
}
TEST_F(FormatTest, OptimizeBreakPenaltyVsExcess) {
More information about the cfe-commits
mailing list