diff options
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 636bf896aae..ce0911e2ffe 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -328,7 +328,7 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty, QualType TypeTy = Context.getCanonicalType(Ty); if (ExprTy == TypeTy) - return Owned(E); + return E; // If this is a derived-to-base cast to a through a virtual base, we // need a vtable. @@ -346,11 +346,11 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty, if (ImpCast->getCastKind() == Kind && (!BasePath || BasePath->empty())) { ImpCast->setType(Ty); ImpCast->setValueKind(VK); - return Owned(E); + return E; } } - return Owned(ImplicitCastExpr::Create(Context, Ty, Kind, E, BasePath, VK)); + return ImplicitCastExpr::Create(Context, Ty, Kind, E, BasePath, VK); } /// ScalarTypeToBooleanCastKind - Returns the cast kind corresponding |