From 554efc225217272df755a962d841d57056af83f4 Mon Sep 17 00:00:00 2001 From: owenca Date: Sat, 21 May 2022 16:13:35 -0700 Subject: [PATCH] [clang-format] Format unit tests with InsertBraces/RemoveBracesLLVM --- clang/unittests/Format/DefinitionBlockSeparatorTest.cpp | 3 ++- clang/unittests/Format/FormatTest.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp b/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp index cb24cc9..45dd2fd 100644 --- a/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp +++ b/clang/unittests/Format/DefinitionBlockSeparatorTest.cpp @@ -76,8 +76,9 @@ protected: 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 83b8dbe..3621ba6 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) { -- 2.7.4