diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-01-24 01:54:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-01-24 01:54:52 +0000 |
commit | 7ff2bcb81424a6f9cded249b14b817ea25c37dcc (patch) | |
tree | 4e9146aa9708e67d4caa78f3d1e1d876fe2b3932 /clang/lib | |
parent | 3e92a2b013c320ed2b2f6fc183a023fb3b657869 (diff) | |
download | bcm5719-llvm-7ff2bcb81424a6f9cded249b14b817ea25c37dcc.tar.gz bcm5719-llvm-7ff2bcb81424a6f9cded249b14b817ea25c37dcc.zip |
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
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<Derived>::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. |