diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-28 23:09:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-28 23:09:44 +0000 |
commit | 8465d5be63dbbd4ddb6adbab087b2a532bdc9e2b (patch) | |
tree | b1e03b7558748c66bea5dd720fd9edc303b96c57 /lib/Sema/SemaDecl.cpp | |
parent | 2ee14504678565a83ad74c0e85f8cb58abb9ffe3 (diff) | |
download | clang-8465d5be63dbbd4ddb6adbab087b2a532bdc9e2b.tar.gz |
If capturing a variable fails, add a capture anyway (and mark it
invalid) so that we can avoid repeated diagnostics for the same capture.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index a035f200fc..188e801b4c 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -12939,7 +12939,7 @@ static void RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator, /*RefersToEnclosingVariableOrCapture*/true, C.getLocation(), /*EllipsisLoc*/C.isPackExpansion() ? C.getEllipsisLoc() : SourceLocation(), - CaptureType, /*Expr*/ nullptr); + CaptureType, /*Expr*/ nullptr, /*Invalid*/false); } else if (C.capturesThis()) { LSI->addThisCapture(/*Nested*/ false, C.getLocation(), |