]> granicus.if.org Git - clang/commitdiff
Fix gcc -Wunused-but-set-variable warning in r191634.
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Wed, 2 Oct 2013 10:59:08 +0000 (10:59 +0000)
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Wed, 2 Oct 2013 10:59:08 +0000 (10:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191817 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateDeduction.cpp

index 2c418ac9e29a31a680f769dad2086db7b97a037e..4a2f939e2a6d7dc76d22d5989bde5614a148eead 100644 (file)
@@ -3745,11 +3745,8 @@ Sema::DeduceTemplateArguments(FunctionTemplateDecl *ConversionTemplate,
   const bool IsGenericLambdaConversionOperator = 
       isLambdaConversionOperator(Conv);
   if (IsGenericLambdaConversionOperator) {
-    const Type *FromTypePtr = P.getTypePtr();
     const Type *ToTypePtr = A.getTypePtr();
 
-    assert(P->isPointerType()); 
-    FromTypePtr = P->getPointeeType().getTypePtr();
     assert(A->isPointerType());
     ToTypePtr = A->getPointeeType().getTypePtr();
     
@@ -3781,11 +3778,11 @@ Sema::DeduceTemplateArguments(FunctionTemplateDecl *ConversionTemplate,
                                                     0, CallOpSpec, OpInfo))
       return Result;
  
-    bool HadToDeduceReturnTypeDuringCurrentCall = false;
+    // bool HadToDeduceReturnTypeDuringCurrentCall = false;
     // If we need to deduce the return type, do so (instantiates the callop).
     if (GenericLambdaCallOperatorHasDeducedReturnType && 
         CallOpSpec->getResultType()->isUndeducedType()) {
-      HadToDeduceReturnTypeDuringCurrentCall = true;
+      // HadToDeduceReturnTypeDuringCurrentCall = true;
       DeduceReturnType(CallOpSpec, CallOpSpec->getPointOfInstantiation(),
                       /*Diagnose*/ true);
     }