diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-11-01 18:57:34 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-11-01 18:57:34 +0000 |
commit | 0505321691aa39105ecd2f92bb64cdaa932fbf08 (patch) | |
tree | 22539286cc3286a7002b256ff27393f2af7b4abb /lib/Sema/SemaExpr.cpp | |
parent | 2eb0ce3610a877f75e95c66d6c2bff315e127009 (diff) |
Find copy constructor needed to copy an rvalue reference
c++ object into block descriptor. // rdar://9971124
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 61766a88c0..d4d08703d3 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1304,7 +1304,10 @@ static CaptureResult shouldCaptureValueReference(Sema &S, SourceLocation loc, // Okay, we descended all the way to the block that defines the variable. // Actually try to capture it. QualType type = var->getType(); - + + if (type->isRValueReferenceType()) + type = type->getPointeeType(); + // Prohibit variably-modified types. if (type->isVariablyModifiedType()) { S.Diag(loc, diag::err_ref_vm_type); |