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 | ab92b753d62d6cee8798c65275b03a8b5d385523 (patch) | |
| tree | d0c87683642cee7131d74547c5a54b36dbdce1ef /clang/lib/Sema/SemaExpr.cpp | |
| parent | 5e27d5e0337a0de10de6c563f03dbf58754f3d8c (diff) | |
| download | bcm5719-llvm-ab92b753d62d6cee8798c65275b03a8b5d385523.tar.gz bcm5719-llvm-ab92b753d62d6cee8798c65275b03a8b5d385523.zip | |
Find copy constructor needed to copy an rvalue reference
c++ object into block descriptor. // rdar://9971124
llvm-svn: 143475
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 61766a88c07..d4d08703d3a 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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); |

