|
@@ -7971,14 +7971,14 @@ void Sema::ActOnFinishCXXMemberSpecification(
|
|
/// definition of the class is complete.
|
|
/// definition of the class is complete.
|
|
void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|
void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|
if (ClassDecl->needsImplicitDefaultConstructor()) {
|
|
if (ClassDecl->needsImplicitDefaultConstructor()) {
|
|
- ++getASTContext().NumImplicitDefaultConstructors;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitDefaultConstructors;
|
|
|
|
|
|
if (ClassDecl->hasInheritedConstructor())
|
|
if (ClassDecl->hasInheritedConstructor())
|
|
DeclareImplicitDefaultConstructor(ClassDecl);
|
|
DeclareImplicitDefaultConstructor(ClassDecl);
|
|
}
|
|
}
|
|
|
|
|
|
if (ClassDecl->needsImplicitCopyConstructor()) {
|
|
if (ClassDecl->needsImplicitCopyConstructor()) {
|
|
- ++getASTContext().NumImplicitCopyConstructors;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitCopyConstructors;
|
|
|
|
|
|
// If the properties or semantics of the copy constructor couldn't be
|
|
// If the properties or semantics of the copy constructor couldn't be
|
|
// determined while the class was being declared, force a declaration
|
|
// determined while the class was being declared, force a declaration
|
|
@@ -8000,7 +8000,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|
}
|
|
}
|
|
|
|
|
|
if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveConstructor()) {
|
|
if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveConstructor()) {
|
|
- ++getASTContext().NumImplicitMoveConstructors;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitMoveConstructors;
|
|
|
|
|
|
if (ClassDecl->needsOverloadResolutionForMoveConstructor() ||
|
|
if (ClassDecl->needsOverloadResolutionForMoveConstructor() ||
|
|
ClassDecl->hasInheritedConstructor())
|
|
ClassDecl->hasInheritedConstructor())
|
|
@@ -8008,7 +8008,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|
}
|
|
}
|
|
|
|
|
|
if (ClassDecl->needsImplicitCopyAssignment()) {
|
|
if (ClassDecl->needsImplicitCopyAssignment()) {
|
|
- ++getASTContext().NumImplicitCopyAssignmentOperators;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitCopyAssignmentOperators;
|
|
|
|
|
|
// If we have a dynamic class, then the copy assignment operator may be
|
|
// If we have a dynamic class, then the copy assignment operator may be
|
|
// virtual, so we have to declare it immediately. This ensures that, e.g.,
|
|
// virtual, so we have to declare it immediately. This ensures that, e.g.,
|
|
@@ -8021,7 +8021,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|
}
|
|
}
|
|
|
|
|
|
if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveAssignment()) {
|
|
if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveAssignment()) {
|
|
- ++getASTContext().NumImplicitMoveAssignmentOperators;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitMoveAssignmentOperators;
|
|
|
|
|
|
// Likewise for the move assignment operator.
|
|
// Likewise for the move assignment operator.
|
|
if (ClassDecl->isDynamicClass() ||
|
|
if (ClassDecl->isDynamicClass() ||
|
|
@@ -8031,7 +8031,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|
}
|
|
}
|
|
|
|
|
|
if (ClassDecl->needsImplicitDestructor()) {
|
|
if (ClassDecl->needsImplicitDestructor()) {
|
|
- ++getASTContext().NumImplicitDestructors;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitDestructors;
|
|
|
|
|
|
// If we have a dynamic class, then the destructor may be virtual, so we
|
|
// If we have a dynamic class, then the destructor may be virtual, so we
|
|
// have to declare the destructor immediately. This ensures that, e.g., it
|
|
// have to declare the destructor immediately. This ensures that, e.g., it
|
|
@@ -11013,7 +11013,7 @@ CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor(
|
|
DefaultCon->setTrivial(ClassDecl->hasTrivialDefaultConstructor());
|
|
DefaultCon->setTrivial(ClassDecl->hasTrivialDefaultConstructor());
|
|
|
|
|
|
// Note that we have declared this constructor.
|
|
// Note that we have declared this constructor.
|
|
- ++getASTContext().NumImplicitDefaultConstructorsDeclared;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitDefaultConstructorsDeclared;
|
|
|
|
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
CheckImplicitSpecialMemberDeclaration(S, DefaultCon);
|
|
CheckImplicitSpecialMemberDeclaration(S, DefaultCon);
|
|
@@ -11286,7 +11286,7 @@ CXXDestructorDecl *Sema::DeclareImplicitDestructor(CXXRecordDecl *ClassDecl) {
|
|
ClassDecl->hasTrivialDestructorForCall());
|
|
ClassDecl->hasTrivialDestructorForCall());
|
|
|
|
|
|
// Note that we have declared this destructor.
|
|
// Note that we have declared this destructor.
|
|
- ++getASTContext().NumImplicitDestructorsDeclared;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitDestructorsDeclared;
|
|
|
|
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
CheckImplicitSpecialMemberDeclaration(S, Destructor);
|
|
CheckImplicitSpecialMemberDeclaration(S, Destructor);
|
|
@@ -11896,7 +11896,7 @@ CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) {
|
|
: ClassDecl->hasTrivialCopyAssignment());
|
|
: ClassDecl->hasTrivialCopyAssignment());
|
|
|
|
|
|
// Note that we have added this copy-assignment operator.
|
|
// Note that we have added this copy-assignment operator.
|
|
- ++getASTContext().NumImplicitCopyAssignmentOperatorsDeclared;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitCopyAssignmentOperatorsDeclared;
|
|
|
|
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
CheckImplicitSpecialMemberDeclaration(S, CopyAssignment);
|
|
CheckImplicitSpecialMemberDeclaration(S, CopyAssignment);
|
|
@@ -12219,7 +12219,7 @@ CXXMethodDecl *Sema::DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl) {
|
|
: ClassDecl->hasTrivialMoveAssignment());
|
|
: ClassDecl->hasTrivialMoveAssignment());
|
|
|
|
|
|
// Note that we have added this copy-assignment operator.
|
|
// Note that we have added this copy-assignment operator.
|
|
- ++getASTContext().NumImplicitMoveAssignmentOperatorsDeclared;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitMoveAssignmentOperatorsDeclared;
|
|
|
|
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
CheckImplicitSpecialMemberDeclaration(S, MoveAssignment);
|
|
CheckImplicitSpecialMemberDeclaration(S, MoveAssignment);
|
|
@@ -12602,7 +12602,7 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor(
|
|
: ClassDecl->hasTrivialCopyConstructorForCall()));
|
|
: ClassDecl->hasTrivialCopyConstructorForCall()));
|
|
|
|
|
|
// Note that we have declared this constructor.
|
|
// Note that we have declared this constructor.
|
|
- ++getASTContext().NumImplicitCopyConstructorsDeclared;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitCopyConstructorsDeclared;
|
|
|
|
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
CheckImplicitSpecialMemberDeclaration(S, CopyConstructor);
|
|
CheckImplicitSpecialMemberDeclaration(S, CopyConstructor);
|
|
@@ -12732,7 +12732,7 @@ CXXConstructorDecl *Sema::DeclareImplicitMoveConstructor(
|
|
: ClassDecl->hasTrivialMoveConstructorForCall()));
|
|
: ClassDecl->hasTrivialMoveConstructorForCall()));
|
|
|
|
|
|
// Note that we have declared this constructor.
|
|
// Note that we have declared this constructor.
|
|
- ++getASTContext().NumImplicitMoveConstructorsDeclared;
|
|
|
|
|
|
+ ++ASTContext::NumImplicitMoveConstructorsDeclared;
|
|
|
|
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
Scope *S = getScopeForContext(ClassDecl);
|
|
CheckImplicitSpecialMemberDeclaration(S, MoveConstructor);
|
|
CheckImplicitSpecialMemberDeclaration(S, MoveConstructor);
|