r191817 - Fix gcc -Wunused-but-set-variable warning in r191634.

Patrik Hagglund patrik.h.hagglund at ericsson.com
Wed Oct 2 03:59:09 PDT 2013


Author: patha
Date: Wed Oct  2 05:59:08 2013
New Revision: 191817

URL: http://llvm.org/viewvc/llvm-project?rev=191817&view=rev
Log:
Fix gcc -Wunused-but-set-variable warning in r191634.

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

Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=191817&r1=191816&r2=191817&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Wed Oct  2 05:59:08 2013
@@ -3745,11 +3745,8 @@ Sema::DeduceTemplateArguments(FunctionTe
   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(FunctionTe
                                                     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);
     }





More information about the cfe-commits mailing list