Removed an unnecessary arguement passed to InitializeVarWithConstructor
which should come from the variable and wasn't correct for arrays in any case.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85415 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 32f4ce0..710e7d3 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1899,7 +1899,6 @@
   /// and sets it as the initializer for the the passed in VarDecl.
   bool InitializeVarWithConstructor(VarDecl *VD,
                                     CXXConstructorDecl *Constructor,
-                                    QualType DeclInitType,
                                     MultiExprArg Exprs);
 
   /// BuildCXXConstructExpr - Creates a complete call to a constructor,
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 48b5c28..5e433de 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3466,7 +3466,7 @@
           else {
             // FIXME: Cope with initialization of arrays
             if (!Constructor->isTrivial() &&
-                InitializeVarWithConstructor(Var, Constructor, InitType, 
+                InitializeVarWithConstructor(Var, Constructor, 
                                              move_arg(ConstructorArgs)))
               Var->setInvalidDecl();
             
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 46e2a7b..4c7705b 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -3154,10 +3154,9 @@
 
 bool Sema::InitializeVarWithConstructor(VarDecl *VD,
                                         CXXConstructorDecl *Constructor,
-                                        QualType DeclInitType,
                                         MultiExprArg Exprs) {
   OwningExprResult TempResult =
-    BuildCXXConstructExpr(VD->getLocation(), DeclInitType, Constructor,
+    BuildCXXConstructExpr(VD->getLocation(), VD->getType(), Constructor,
                           move(Exprs));
   if (TempResult.isInvalid())
     return true;
@@ -3262,7 +3261,7 @@
       RealDecl->setInvalidDecl();
     else {
       VDecl->setCXXDirectInitializer(true);
-      if (InitializeVarWithConstructor(VDecl, Constructor, DeclInitType,
+      if (InitializeVarWithConstructor(VDecl, Constructor, 
                                        move_arg(ConstructorArgs)))
         RealDecl->setInvalidDecl();
       FinalizeVarWithDestructor(VDecl, DeclInitType);