diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -1068,9 +1068,6 @@ Changes[CellIter->Index].Spaces = CellDescs.InitialSpaces; ++CellIter; for (auto i = 1U; i < CellDescs.CellCount; i++, ++CellIter) { - unsigned NetWidth = 0U; - if (isSplitCell(*CellIter)) - NetWidth = getNetWidth(Cells.begin(), CellIter, CellDescs.InitialSpaces); auto MaxNetWidth = getMaximumNetWidth( Cells.begin(), CellIter, CellDescs.InitialSpaces, CellDescs.CellCount); auto ThisNetWidth = diff --git a/clang/test/Format/struct-array-initializer.cpp b/clang/test/Format/struct-array-initializer.cpp --- a/clang/test/Format/struct-array-initializer.cpp +++ b/clang/test/Format/struct-array-initializer.cpp @@ -1,9 +1,5 @@ -// RUN: grep -Ev "// *[A-Z-]+:" %s \ -// RUN: | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Right}" %s \ -// RUN: | FileCheck -strict-whitespace -check-prefix=CHECK1 %s -// RUN: grep -Ev "// *[A-Z-]+:" %s \ -// RUN: | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Left}" %s \ -// RUN: | FileCheck -strict-whitespace -check-prefix=CHECK2 %s +// RUN: clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Right}" %s | FileCheck -strict-whitespace -check-prefix=CHECK1 %s +// RUN: clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Left}" %s | FileCheck -strict-whitespace -check-prefix=CHECK2 %s struct test { int a; int b;