Skip to content

Commit 34ce42f

Browse files
committed
[clang-format] Reformat. NFC.
1 parent 2f1d918 commit 34ce42f

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

clang/lib/Format/WhitespaceManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,8 @@ void WhitespaceManager::alignArrayInitializersLeftJustified(
11631163
auto Offset = std::distance(Cells.begin(), CellIter);
11641164
for (const auto *Next = CellIter->NextColumnElement; Next != nullptr;
11651165
Next = Next->NextColumnElement) {
1166-
if (RowCount > CellDescs.CellCounts.size()) {
1166+
if (RowCount > CellDescs.CellCounts.size())
11671167
break;
1168-
}
11691168
auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]);
11701169
auto *End = Start + Offset;
11711170
auto ThisNetWidth = getNetWidth(Start, End, CellDescs.InitialSpaces);

clang/unittests/Format/FormatTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7217,9 +7217,8 @@ TEST_F(FormatTest, MemoizationTests) {
72177217
OnePerLine.BinPackParameters = false;
72187218
std::string input = "Constructor()\n"
72197219
" : aaaa(a,\n";
7220-
for (unsigned i = 0, e = 80; i != e; ++i) {
7220+
for (unsigned i = 0, e = 80; i != e; ++i)
72217221
input += " a,\n";
7222-
}
72237222
input += " a) {}";
72247223
verifyFormat(input, OnePerLine);
72257224
}

clang/unittests/Format/FormatTestJson.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ class FormatTestJson : public ::testing::Test {
3030
if (Style.isJson() && !Style.DisableFormat) {
3131
auto Err = Replaces.add(
3232
tooling::Replacement(tooling::Replacement("", 0, 0, "x = ")));
33-
if (Err) {
33+
if (Err)
3434
llvm::errs() << "Bad Json variable insertion\n";
35-
}
3635
}
3736
auto ChangedCode = applyAllReplacements(Code, Replaces);
38-
if (!ChangedCode) {
37+
if (!ChangedCode)
3938
llvm::errs() << "Bad Json varibale replacement\n";
40-
}
4139
StringRef NewCode = *ChangedCode;
4240

4341
std::vector<tooling::Range> Ranges(1, tooling::Range(0, NewCode.size()));

clang/unittests/Format/MacroExpanderTest.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ class MacroExpanderTest : public ::testing::Test {
2828
llvm::SmallVector<TokenList, 1>
2929
lexArgs(const std::vector<std::string> &Args) {
3030
llvm::SmallVector<TokenList, 1> Result;
31-
for (const auto &Arg : Args) {
31+
for (const auto &Arg : Args)
3232
Result.push_back(uneof(Lex.lex(Arg)));
33-
}
3433
return Result;
3534
}
3635

@@ -78,9 +77,8 @@ class MacroExpanderTest : public ::testing::Test {
7877
TEST_F(MacroExpanderTest, SkipsDefinitionOnError) {
7978
auto Macros =
8079
create({"A(", "B(,", "C(a,", "D(a a", "E(a, a", "F(,)", "G(a;"});
81-
for (const auto *Name : {"A", "B", "C", "D", "E", "F", "G"}) {
80+
for (const auto *Name : {"A", "B", "C", "D", "E", "F", "G"})
8281
EXPECT_FALSE(Macros->defined(Name)) << "for Name " << Name;
83-
}
8482
}
8583

8684
TEST_F(MacroExpanderTest, ExpandsWithoutArguments) {

clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ TEST_F(NamespaceEndCommentsFixerTest, WorksForObjCpp) {
469469
fixNamespaceEndComments("namespace {\n"
470470
"int i;\n"
471471
"int j;\n"
472-
"}", ObjCppStyle));
472+
"}",
473+
ObjCppStyle));
473474
}
474475

475476
TEST_F(NamespaceEndCommentsFixerTest, AddsMacroEndComment) {

clang/unittests/Format/TestLexer.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ inline std::ostream &operator<<(std::ostream &Stream, const FormatToken &Tok) {
3737
}
3838
inline std::ostream &operator<<(std::ostream &Stream, const TokenList &Tokens) {
3939
Stream << "{";
40-
for (size_t I = 0, E = Tokens.size(); I != E; ++I) {
40+
for (size_t I = 0, E = Tokens.size(); I != E; ++I)
4141
Stream << (I > 0 ? ", " : "") << *Tokens[I];
42-
}
4342
Stream << "} (" << Tokens.size() << " tokens)";
4443
return Stream;
4544
}

0 commit comments

Comments
 (0)