diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-31 01:17:04 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-31 01:17:04 +0000 |
commit | b5a45bb77e05647f04bbd9780d70aabe9f251155 (patch) | |
tree | 1ccaf0c1585826b9245a8253bea9150801f2f46c /clang/lib/Sema/SemaDecl.cpp | |
parent | a35c50c9a4d1c15b4830c40013e73ec7933f8f6c (diff) | |
download | bcm5719-llvm-b5a45bb77e05647f04bbd9780d70aabe9f251155.tar.gz bcm5719-llvm-b5a45bb77e05647f04bbd9780d70aabe9f251155.zip |
Defer building 'this' captures until we have left the capturing region
and returned to the context in which 'this' should be captured.
This means we now always mark 'this' referenced from the context in
which it's actually referenced, rather than potentially from some
context nested within that.
llvm-svn: 362182
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 759eb531c50..6bd7b4e0711 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -12943,7 +12943,7 @@ static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, } else if (C.capturesThis()) { LSI->addThisCapture(/*Nested*/ false, C.getLocation(), I->getType(), - /*Expr*/ nullptr, C.getCaptureKind() == LCK_StarThis); + C.getCaptureKind() == LCK_StarThis); } else { LSI->addVLATypeCapture(C.getLocation(), I->getCapturedVLAType(), I->getType()); |