[clang] d650ccf - [NFC] Remove unused variable

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 14 10:57:46 PDT 2021


Author: Vitaly Buka
Date: 2021-06-14T10:57:26-07:00
New Revision: d650ccf6390bb1e4454dd735cfcec9eda9af8ca3

URL: https://github.com/llvm/llvm-project/commit/d650ccf6390bb1e4454dd735cfcec9eda9af8ca3
DIFF: https://github.com/llvm/llvm-project/commit/d650ccf6390bb1e4454dd735cfcec9eda9af8ca3.diff

LOG: [NFC] Remove unused variable

To fix 'set but not used' warning on sanitizer-x86_64-linux-android bot.

Added: 
    

Modified: 
    clang/lib/Format/WhitespaceManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp
index 222c4c4e8e29a..b079eac9803c4 100644
--- a/clang/lib/Format/WhitespaceManager.cpp
+++ b/clang/lib/Format/WhitespaceManager.cpp
@@ -1068,9 +1068,6 @@ void WhitespaceManager::alignArrayInitializersLeftJustified(
     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 =


        


More information about the cfe-commits mailing list