From 28cc16a64a3bbad9e48309eb8b4ee68893cd85d0 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Thu, 22 Aug 2013 12:12:05 +0000 Subject: [PATCH] Revert "Remove some unused variables identified by Juergen Ributzka *I need to turn on this warning in Visual C++ - sorry!*" This reverts commit d01d0b63d87ac465f15ce1d6b56bf3faf4525769. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189003 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseExprCXX.cpp | 1 + lib/Sema/SemaLambda.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index dc82918c07..1ab70475e5 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -938,6 +938,7 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( if (Tok.isNot(tok::r_paren)) { + sema::LambdaScopeInfo *LSI = Actions.getCurLambda(); if (getLangOpts().CPlusPlus1y) Actions.RecordParsingTemplateParameterDepth(TemplateParameterDepth); ParseParameterDeclarationClause(D, Attr, ParamInfo, EllipsisLoc); diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index 1d6a4d6909..bed71a676f 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -143,6 +143,7 @@ ParmVarDecl *Sema::ActOnLambdaAutoParameter(ParmVarDecl *PVD) { AutoParameterPosition, // our template param index /* Identifier*/ 0, false, PVD->isParameterPack()); LSI->AutoTemplateParams.push_back(TemplateParam); + QualType AutoTy = PVD->getType(); // Now replace the 'auto' in the function parameter with this invented // template type parameter. QualType TemplParamType = QualType(TemplateParam->getTypeForDecl(), 0); -- 2.40.0