diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-20 20:56:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-20 20:56:30 +0000 |
commit | 04f81b1fa04c02809a303d34ee6b19149d5aa29f (patch) | |
tree | e63b4887c098f5da12c99f1790fda956153e2d71 /lib/Sema/SemaDecl.cpp | |
parent | f9368159334ff86ea5fa367225c1a580977f3b03 (diff) |
Fix CMake build on windows, from Cedric Venet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index c873f39579..a80d62a473 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3745,28 +3745,19 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl, InitType->isRecordType() && !InitType->isDependentType()) { if (!RequireCompleteType(Var->getLocation(), InitType, diag::err_invalid_incomplete_type_use)) { - ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this); - - CXXConstructorDecl *Constructor - = PerformInitializationByConstructor(InitType, - MultiExprArg(*this, 0, 0), - Var->getLocation(), - SourceRange(Var->getLocation(), - Var->getLocation()), - Var->getDeclName(), - InitializationKind::CreateDefault(Var->getLocation()), - ConstructorArgs); - - // FIXME: Location info for the variable initialization? - if (!Constructor) + InitializedEntity Entity + = InitializedEntity::InitializeVariable(Var); + InitializationKind Kind + = InitializationKind::CreateDefault(Var->getLocation()); + + InitializationSequence InitSeq(*this, Entity, Kind, 0, 0); + OwningExprResult Init = InitSeq.Perform(*this, Entity, Kind, + MultiExprArg(*this, 0, 0)); + if (Init.isInvalid()) Var->setInvalidDecl(); else { - // FIXME: Cope with initialization of arrays - if (!Constructor->isTrivial() && - InitializeVarWithConstructor(Var, Constructor, - move_arg(ConstructorArgs))) - Var->setInvalidDecl(); - + Var->setInit(Context, + MaybeCreateCXXExprWithTemporaries(Init.takeAs<Expr>())); FinalizeVarWithDestructor(Var, InitType); } } else { |