]> granicus.if.org Git - clang/commitdiff
Remove use of uninitized variable.
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 8 Aug 2009 00:59:58 +0000 (00:59 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 8 Aug 2009 00:59:58 +0000 (00:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78448 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXX.cpp
lib/CodeGen/CodeGenModule.cpp

index 3ccde5b19041ca2b5d1f6077c814eadd1f77c05b..3e828bf9ac2e363baf486956b869fd889716e450 100644 (file)
@@ -674,9 +674,8 @@ void CodeGenFunction::EmitClassMemberwiseCopy(
   // FIXME. Do bitwise copy of trivial copy constructors.
   if (BaseClassDecl->hasTrivialCopyConstructor())
     return;
-  unsigned TypeQuals;
   if (CXXConstructorDecl *BaseCopyCtor = 
-      BaseClassDecl->getCopyConstructor(getContext(), TypeQuals)) {
+      BaseClassDecl->getCopyConstructor(getContext(), 0)) {
     llvm::Value *Callee = CGM.GetAddrOfCXXConstructor(BaseCopyCtor, 
                                                       Ctor_Complete);
     
index e1cf13c72da38f87cc7805361deffb256aff7e46..503bcda8e7b33efbca252424431e5b6eac9fd07d 100644 (file)
@@ -686,18 +686,16 @@ void CodeGenModule::DeferredCopyConstructorToEmit(GlobalDecl CopyCtorDecl) {
   // are defined. 12.8.p7
   for (CXXRecordDecl::base_class_const_iterator Base = ClassDecl->bases_begin();
        Base != ClassDecl->bases_end(); ++Base) {
-    unsigned TypeQuals;
     CXXRecordDecl *BaseClassDecl
       = cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl());
     if (CXXConstructorDecl *BaseCopyCtor = 
-        BaseClassDecl->getCopyConstructor(Context, TypeQuals))
+        BaseClassDecl->getCopyConstructor(Context, 0))
       GetAddrOfCXXConstructor(BaseCopyCtor, Ctor_Complete);
   }
   
   for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(),
        FieldEnd = ClassDecl->field_end();
        Field != FieldEnd; ++Field) {
-    unsigned TypeQuals;
     QualType FieldType = Context.getCanonicalType((*Field)->getType());
     if (const ArrayType *Array = Context.getAsArrayType(FieldType))
       FieldType = Array->getElementType();
@@ -705,7 +703,7 @@ void CodeGenModule::DeferredCopyConstructorToEmit(GlobalDecl CopyCtorDecl) {
       CXXRecordDecl *FieldClassDecl
       = cast<CXXRecordDecl>(FieldClassType->getDecl());
       if (CXXConstructorDecl *FieldCopyCtor = 
-          FieldClassDecl->getCopyConstructor(Context, TypeQuals))
+          FieldClassDecl->getCopyConstructor(Context, 0))
         GetAddrOfCXXConstructor(FieldCopyCtor, Ctor_Complete);
     }
   }