]> granicus.if.org Git - clang/commitdiff
Removed an unnecessary arguement passed to InitializeVarWithConstructor
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 28 Oct 2009 18:41:06 +0000 (18:41 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Wed, 28 Oct 2009 18:41:06 +0000 (18:41 +0000)
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

lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp

index 32f4ce07326a37516646b8906cd1a7b5cceb2e92..710e7d35c415c55af21615fa25ac31188207f0b0 100644 (file)
@@ -1899,7 +1899,6 @@ public:
   /// 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,
index 48b5c2838e0bc9c12a1082944b67c87103644793..5e433de3bbfa35177c2559b4f4fb179fce7aeee3 100644 (file)
@@ -3466,7 +3466,7 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl,
           else {
             // FIXME: Cope with initialization of arrays
             if (!Constructor->isTrivial() &&
-                InitializeVarWithConstructor(Var, Constructor, InitType, 
+                InitializeVarWithConstructor(Var, Constructor, 
                                              move_arg(ConstructorArgs)))
               Var->setInvalidDecl();
             
index 46e2a7b0e1a570d76edb13a4a3acd02bc3599986..4c7705b815d3cf6a9407e8387d07d912f5da884f 100644 (file)
@@ -3154,10 +3154,9 @@ Sema::BuildCXXTemporaryObjectExpr(CXXConstructorDecl *Constructor,
 
 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 @@ void Sema::AddCXXDirectInitializerToDecl(DeclPtrTy Dcl,
       RealDecl->setInvalidDecl();
     else {
       VDecl->setCXXDirectInitializer(true);
-      if (InitializeVarWithConstructor(VDecl, Constructor, DeclInitType,
+      if (InitializeVarWithConstructor(VDecl, Constructor, 
                                        move_arg(ConstructorArgs)))
         RealDecl->setInvalidDecl();
       FinalizeVarWithDestructor(VDecl, DeclInitType);