diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-04-25 00:55:24 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-04-25 00:55:24 +0000 |
| commit | d0ace024965bb68e3d4a5a082f1b94fa56253198 (patch) | |
| tree | 6e7d0f43247cc8916fde57366f04bd1447cbe8ac /clang/lib/Sema/SemaOverload.cpp | |
| parent | 53e1ba948d218d8de028fa8c522ee1e903ee533a (diff) | |
| download | bcm5719-llvm-d0ace024965bb68e3d4a5a082f1b94fa56253198.tar.gz bcm5719-llvm-d0ace024965bb68e3d4a5a082f1b94fa56253198.zip | |
When copying a temporary object to initialize an entity for which the
temporary needs to be bound, bind the copy object. Otherwise, we won't
end up calling the destructor for the copy. Fixes Boost.Optional.
llvm-svn: 102290
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 463f1899ed9..06b5fcb318c 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -3703,7 +3703,7 @@ static Qualifiers CollectVRQualifiers(ASTContext &Context, Expr* ArgExpr) { const RecordType *TyRec; if (const MemberPointerType *RHSMPType = ArgExpr->getType()->getAs<MemberPointerType>()) - TyRec = cast<RecordType>(RHSMPType->getClass()); + TyRec = RHSMPType->getClass()->getAs<RecordType>(); else TyRec = ArgExpr->getType()->getAs<RecordType>(); if (!TyRec) { |

