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

llvm-svn: 191817
This commit is contained in:
Patrik Hagglund 2013-10-02 10:59:08 +00:00
parent 75987a65f3
commit 375d6c1ee0
1 changed files with 2 additions and 5 deletions

View File

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