diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-25 20:50:04 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-25 20:50:04 +0000 |
commit | ffe37fdda5b4b4f162a45155c30d9f60ce110c12 (patch) | |
tree | 0762005170c0e287f0f43ae0393cb53f9b493c16 /lib/Sema/SemaDeclCXX.cpp | |
parent | b44eda31a214ad88616acbe28c3f0a70268adc6c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index e8f2f57a22..1e3baa26f3 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/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); } } |