aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 7c4ab890d0..92a94daea6 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -446,18 +446,9 @@ Sema::BuildCXXNew(SourceLocation StartLoc, bool UseGlobal,
ConstructorLParen,
ConstructorRParen);
- // FIXME: We shouldn't have to fake this.
- TypeSourceInfo *TInfo
- = Context.getTrivialTypeSourceInfo(AllocType, TypeLoc);
InitializedEntity Entity
- = InitializedEntity::InitializeNew(StartLoc, TInfo->getTypeLoc());
+ = InitializedEntity::InitializeNew(StartLoc, AllocType);
InitializationSequence InitSeq(*this, Entity, Kind, ConsArgs, NumConsArgs);
-
- if (!InitSeq) {
- InitSeq.Diagnose(*this, Entity, Kind, ConsArgs, NumConsArgs);
- return ExprError();
- }
-
OwningExprResult FullInit = InitSeq.Perform(*this, Entity, Kind,
move(ConstructorArgs));
if (FullInit.isInvalid())