From fcaeae492940662da16b2a75dbf3be494150b82f Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Wed, 25 May 2011 20:50:04 +0000 Subject: Implement a little bit of cleanup and a lot more of the base work behind implicit moves. We now correctly identify move constructors and assignment operators and update bits on the record correctly. Generation of implicit moves (declarations or definitions) is not yet supported. llvm-svn: 132080 --- clang/lib/Sema/SemaDeclCXX.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'clang/lib/Sema/SemaDeclCXX.cpp') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index e8f2f57a220..1e3baa26f33 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -7069,8 +7069,7 @@ Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(CXXRecordDecl *ClassDecl) { if (!BaseClassDecl->hasDeclaredCopyConstructor()) DeclareImplicitCopyConstructor(BaseClassDecl); - HasConstCopyConstructor - = BaseClassDecl->hasConstCopyConstructor(Context); + HasConstCopyConstructor = BaseClassDecl->hasConstCopyConstructor(); } for (CXXRecordDecl::base_class_iterator Base = ClassDecl->vbases_begin(), @@ -7082,8 +7081,7 @@ Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(CXXRecordDecl *ClassDecl) { if (!BaseClassDecl->hasDeclaredCopyConstructor()) DeclareImplicitCopyConstructor(BaseClassDecl); - HasConstCopyConstructor - = BaseClassDecl->hasConstCopyConstructor(Context); + HasConstCopyConstructor= BaseClassDecl->hasConstCopyConstructor(); } // -- for all the nonstatic data members of X that are of a @@ -7101,8 +7099,7 @@ Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(CXXRecordDecl *ClassDecl) { if (!FieldClassDecl->hasDeclaredCopyConstructor()) DeclareImplicitCopyConstructor(FieldClassDecl); - HasConstCopyConstructor - = FieldClassDecl->hasConstCopyConstructor(Context); + HasConstCopyConstructor = FieldClassDecl->hasConstCopyConstructor(); } } // Otherwise, the implicitly declared copy constructor will have @@ -7129,7 +7126,7 @@ Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(CXXRecordDecl *ClassDecl) { DeclareImplicitCopyConstructor(BaseClassDecl); if (CXXConstructorDecl *CopyConstructor - = BaseClassDecl->getCopyConstructor(Context, Quals)) + = BaseClassDecl->getCopyConstructor(Quals)) ExceptSpec.CalledDecl(CopyConstructor); } for (CXXRecordDecl::base_class_iterator Base = ClassDecl->vbases_begin(), @@ -7142,7 +7139,7 @@ Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(CXXRecordDecl *ClassDecl) { DeclareImplicitCopyConstructor(BaseClassDecl); if (CXXConstructorDecl *CopyConstructor - = BaseClassDecl->getCopyConstructor(Context, Quals)) + = BaseClassDecl->getCopyConstructor(Quals)) ExceptSpec.CalledDecl(CopyConstructor); } for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(), @@ -7157,7 +7154,7 @@ Sema::ComputeDefaultedCopyCtorExceptionSpecAndConst(CXXRecordDecl *ClassDecl) { DeclareImplicitCopyConstructor(FieldClassDecl); if (CXXConstructorDecl *CopyConstructor - = FieldClassDecl->getCopyConstructor(Context, Quals)) + = FieldClassDecl->getCopyConstructor(Quals)) ExceptSpec.CalledDecl(CopyConstructor); } } -- cgit v1.2.3