diff options
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 15c21008be..48daf84d6b 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -441,8 +441,10 @@ bool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, Expr *&E) { // Initialize the exception result. This implicitly weeds out // abstract types or types with inaccessible copy constructors. + // FIXME: Determine whether we can elide this copy per C++0x [class.copy]p34. InitializedEntity Entity = - InitializedEntity::InitializeException(ThrowLoc, E->getType()); + InitializedEntity::InitializeException(ThrowLoc, E->getType(), + /*NRVO=*/false); OwningExprResult Res = PerformCopyInitialization(Entity, SourceLocation(), Owned(E)); |