From 6816c25d30b04cfffb35757cc7df95a0b89b1687 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 1 Sep 2019 13:10:08 +0000 Subject: [PATCH] Fix variable HasArrayDesignator set but not used warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370609 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaInit.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 87cc3cd762..51e9f3d632 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3132,7 +3132,6 @@ ExprResult Sema::ActOnDesignatedInitializer(Designation &Desig, bool Invalid = false; SmallVector Designators; SmallVector InitExpressions; - bool HasArrayDesignator = false; // Build designators and check array designator expressions. for (unsigned Idx = 0; Idx < Desig.getNumDesignators(); ++Idx) { @@ -3156,7 +3155,6 @@ ExprResult Sema::ActOnDesignatedInitializer(Designation &Desig, D.getRBracketLoc())); InitExpressions.push_back(Index); } - HasArrayDesignator = true; break; } @@ -3200,7 +3198,6 @@ ExprResult Sema::ActOnDesignatedInitializer(Designation &Desig, InitExpressions.push_back(EndIndex); } } - HasArrayDesignator = true; break; } } -- 2.40.0