From 2815d9c9989c52ac9c5687253bc544fac9d32c7f Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 7 Oct 2013 09:32:50 +0000 Subject: [PATCH] Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock, and IsLambda. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192095 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExpr.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 8129f8693f..9188808bce 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -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(); - // 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(CSI); - bool IsLambda = isa(CSI); // Certain capturing entities (lambdas, blocks etc.) are not allowed to capture // certain types of variables (unnamed, variably modified types etc.) -- 2.40.0