]> granicus.if.org Git - clang/commitdiff
Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 7 Oct 2013 09:32:50 +0000 (09:32 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 7 Oct 2013 09:32:50 +0000 (09:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192095 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 8129f8693f94bf23f4eaf015b5661c890ee7f79f..9188808bcef2782b6713ac886b41c6fd4fbaa5fa 100644 (file)
@@ -11687,8 +11687,6 @@ bool Sema::tryCaptureVariable(VarDecl *Var, SourceLocation ExprLoc,
   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 *Var, SourceLocation ExprLoc,
     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.)