]> granicus.if.org Git - clang/commitdiff
Unbreak the Clang -Werror build by removing some unused variables
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 7 Nov 2013 05:52:35 +0000 (05:52 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 7 Nov 2013 05:52:35 +0000 (05:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194190 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprCXX.cpp

index d8d05c78e2d9d8610c335a8e60bf75b752a9ea04..84220f7c9c70072eba5bed1769e3f939c9d1a3c0 100644 (file)
@@ -5882,12 +5882,9 @@ static void CheckLambdaCaptures(Expr *const FE,
     //   - a generic-or-non-generic lambda call operator that is enclosed
     //     within a non-dependent context.
     unsigned FunctionScopeIndexOfCapturableLambda = 0;
-    CXXMethodDecl *NearestCapturableCallOp = 0;
-    if (NearestCapturableCallOp = 
-                          GetInnermostEnclosingCapturableLambda(
-                                  S.FunctionScopes,
-                                  FunctionScopeIndexOfCapturableLambda,
-                                  S.CurContext, Var, S)) { 
+    if (GetInnermostEnclosingCapturableLambda(
+            S.FunctionScopes, FunctionScopeIndexOfCapturableLambda,
+            S.CurContext, Var, S)) {
       MarkVarDeclODRUsed(Var, VarExpr->getExprLoc(), 
           S, &FunctionScopeIndexOfCapturableLambda);
     } 
@@ -5918,11 +5915,9 @@ static void CheckLambdaCaptures(Expr *const FE,
 
   if (CurrentLSI->hasPotentialThisCapture()) {
     unsigned FunctionScopeIndexOfCapturableLambda = 0;
-    if (CXXMethodDecl *NearestCapturableCallOp = 
-                          GetInnermostEnclosingCapturableLambda(
-                                  S.FunctionScopes,
-                                  FunctionScopeIndexOfCapturableLambda,
-                                  S.CurContext, /*0 is 'this'*/ 0, S)) {        
+    if (GetInnermostEnclosingCapturableLambda(
+            S.FunctionScopes, FunctionScopeIndexOfCapturableLambda,
+            S.CurContext, /*0 is 'this'*/ 0, S)) {
       S.CheckCXXThisCapture(CurrentLSI->PotentialThisCaptureLocation, 
           /*Explicit*/false, /*BuildAndDiagnose*/true,  
           &FunctionScopeIndexOfCapturableLambda);