r192095 - Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock, and IsLambda. [-Wunused-variable]

NAKAMURA Takumi geek4civic at gmail.com
Mon Oct 7 02:32:50 PDT 2013


Author: chapuni
Date: Mon Oct  7 04:32:50 2013
New Revision: 192095

URL: http://llvm.org/viewvc/llvm-project?rev=192095&view=rev
Log:
Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock, and IsLambda. [-Wunused-variable]

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=192095&r1=192094&r2=192095&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Oct  7 04:32:50 2013
@@ -11687,8 +11687,6 @@ bool Sema::tryCaptureVariable(VarDecl *V
   if (!Var->isInitCapture() && Var->getDeclContext() == DC) return true;
   if (!Var->hasLocalStorage()) return true;
 
-  bool HasBlocksAttr = Var->hasAttr<BlocksAttr>();
-
   // Walk up the stack to determine whether we can capture the variable,
   // performing the "simple" checks that don't depend on type. We stop when
   // we've either hit the declared scope of the variable or find an existing
@@ -11718,8 +11716,6 @@ bool Sema::tryCaptureVariable(VarDecl *V
     if (isVariableAlreadyCapturedInScopeInfo(CSI, Var, Nested, CaptureType, 
                                              DeclRefType)) 
       break;
-    bool IsBlock = isa<BlockScopeInfo>(CSI);
-    bool IsLambda = isa<LambdaScopeInfo>(CSI);
    
     // Certain capturing entities (lambdas, blocks etc.) are not allowed to capture 
     // certain types of variables (unnamed, variably modified types etc.)





More information about the cfe-commits mailing list