From 7ff2bcb81424a6f9cded249b14b817ea25c37dcc Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 24 Jan 2014 01:54:52 +0000 Subject: PR18560: When switching to a new context, don't just save and restore an override for the type of 'this', also clear it out (unless we're entering the context of a lambda-expression, where it should be inherited). llvm-svn: 199962 --- clang/lib/Sema/TreeTransform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/TreeTransform.h') diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 787581d35be..27380f8c8d4 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -8339,7 +8339,8 @@ TreeTransform::TransformLambdaScope(LambdaExpr *E, bool Invalid = false; // Introduce the context of the call operator. - Sema::ContextRAII SavedContext(getSema(), CallOperator); + Sema::ContextRAII SavedContext(getSema(), CallOperator, + /*NewThisContext*/false); LambdaScopeInfo *const LSI = getSema().getCurLambda(); // Enter the scope of the lambda. -- cgit v1.2.3