//===--------------------------------------------------------------------===//
/// The number of implicitly-declared default constructors.
- unsigned NumImplicitDefaultConstructors;
+ static unsigned NumImplicitDefaultConstructors;
/// The number of implicitly-declared default constructors for
/// which declarations were built.
- unsigned NumImplicitDefaultConstructorsDeclared;
+ static unsigned NumImplicitDefaultConstructorsDeclared;
/// The number of implicitly-declared copy constructors.
- unsigned NumImplicitCopyConstructors;
+ static unsigned NumImplicitCopyConstructors;
/// The number of implicitly-declared copy constructors for
/// which declarations were built.
- unsigned NumImplicitCopyConstructorsDeclared;
+ static unsigned NumImplicitCopyConstructorsDeclared;
/// The number of implicitly-declared move constructors.
- unsigned NumImplicitMoveConstructors;
+ static unsigned NumImplicitMoveConstructors;
/// The number of implicitly-declared move constructors for
/// which declarations were built.
- unsigned NumImplicitMoveConstructorsDeclared;
+ static unsigned NumImplicitMoveConstructorsDeclared;
/// The number of implicitly-declared copy assignment operators.
- unsigned NumImplicitCopyAssignmentOperators;
+ static unsigned NumImplicitCopyAssignmentOperators;
/// The number of implicitly-declared copy assignment operators for
/// which declarations were built.
- unsigned NumImplicitCopyAssignmentOperatorsDeclared;
+ static unsigned NumImplicitCopyAssignmentOperatorsDeclared;
/// The number of implicitly-declared move assignment operators.
- unsigned NumImplicitMoveAssignmentOperators;
+ static unsigned NumImplicitMoveAssignmentOperators;
/// The number of implicitly-declared move assignment operators for
/// which declarations were built.
- unsigned NumImplicitMoveAssignmentOperatorsDeclared;
+ static unsigned NumImplicitMoveAssignmentOperatorsDeclared;
/// The number of implicitly-declared destructors.
- unsigned NumImplicitDestructors;
+ static unsigned NumImplicitDestructors;
/// The number of implicitly-declared destructors for which
/// declarations were built.
- unsigned NumImplicitDestructorsDeclared;
+ static unsigned NumImplicitDestructorsDeclared;
public:
/// Initialize built-in types.
using namespace clang;
+unsigned ASTContext::NumImplicitDefaultConstructors;
+unsigned ASTContext::NumImplicitDefaultConstructorsDeclared;
+unsigned ASTContext::NumImplicitCopyConstructors;
+unsigned ASTContext::NumImplicitCopyConstructorsDeclared;
+unsigned ASTContext::NumImplicitMoveConstructors;
+unsigned ASTContext::NumImplicitMoveConstructorsDeclared;
+unsigned ASTContext::NumImplicitCopyAssignmentOperators;
+unsigned ASTContext::NumImplicitCopyAssignmentOperatorsDeclared;
+unsigned ASTContext::NumImplicitMoveAssignmentOperators;
+unsigned ASTContext::NumImplicitMoveAssignmentOperatorsDeclared;
+unsigned ASTContext::NumImplicitDestructors;
+unsigned ASTContext::NumImplicitDestructorsDeclared;
+
enum FloatingRank {
Float16Rank, HalfRank, FloatRank, DoubleRank, LongDoubleRank, Float128Rank
};
/// definition of the class is complete.
void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
if (ClassDecl->needsImplicitDefaultConstructor()) {
- ++getASTContext().NumImplicitDefaultConstructors;
+ ++ASTContext::NumImplicitDefaultConstructors;
if (ClassDecl->hasInheritedConstructor())
DeclareImplicitDefaultConstructor(ClassDecl);
}
if (ClassDecl->needsImplicitCopyConstructor()) {
- ++getASTContext().NumImplicitCopyConstructors;
+ ++ASTContext::NumImplicitCopyConstructors;
// If the properties or semantics of the copy constructor couldn't be
// determined while the class was being declared, force a declaration
}
if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveConstructor()) {
- ++getASTContext().NumImplicitMoveConstructors;
+ ++ASTContext::NumImplicitMoveConstructors;
if (ClassDecl->needsOverloadResolutionForMoveConstructor() ||
ClassDecl->hasInheritedConstructor())
}
if (ClassDecl->needsImplicitCopyAssignment()) {
- ++getASTContext().NumImplicitCopyAssignmentOperators;
+ ++ASTContext::NumImplicitCopyAssignmentOperators;
// 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.,
}
if (getLangOpts().CPlusPlus11 && ClassDecl->needsImplicitMoveAssignment()) {
- ++getASTContext().NumImplicitMoveAssignmentOperators;
+ ++ASTContext::NumImplicitMoveAssignmentOperators;
// Likewise for the move assignment operator.
if (ClassDecl->isDynamicClass() ||
}
if (ClassDecl->needsImplicitDestructor()) {
- ++getASTContext().NumImplicitDestructors;
+ ++ASTContext::NumImplicitDestructors;
// 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
DefaultCon->setTrivial(ClassDecl->hasTrivialDefaultConstructor());
// Note that we have declared this constructor.
- ++getASTContext().NumImplicitDefaultConstructorsDeclared;
+ ++ASTContext::NumImplicitDefaultConstructorsDeclared;
Scope *S = getScopeForContext(ClassDecl);
CheckImplicitSpecialMemberDeclaration(S, DefaultCon);
ClassDecl->hasTrivialDestructorForCall());
// Note that we have declared this destructor.
- ++getASTContext().NumImplicitDestructorsDeclared;
+ ++ASTContext::NumImplicitDestructorsDeclared;
Scope *S = getScopeForContext(ClassDecl);
CheckImplicitSpecialMemberDeclaration(S, Destructor);
: ClassDecl->hasTrivialCopyAssignment());
// Note that we have added this copy-assignment operator.
- ++getASTContext().NumImplicitCopyAssignmentOperatorsDeclared;
+ ++ASTContext::NumImplicitCopyAssignmentOperatorsDeclared;
Scope *S = getScopeForContext(ClassDecl);
CheckImplicitSpecialMemberDeclaration(S, CopyAssignment);
: ClassDecl->hasTrivialMoveAssignment());
// Note that we have added this copy-assignment operator.
- ++getASTContext().NumImplicitMoveAssignmentOperatorsDeclared;
+ ++ASTContext::NumImplicitMoveAssignmentOperatorsDeclared;
Scope *S = getScopeForContext(ClassDecl);
CheckImplicitSpecialMemberDeclaration(S, MoveAssignment);
: ClassDecl->hasTrivialCopyConstructorForCall()));
// Note that we have declared this constructor.
- ++getASTContext().NumImplicitCopyConstructorsDeclared;
+ ++ASTContext::NumImplicitCopyConstructorsDeclared;
Scope *S = getScopeForContext(ClassDecl);
CheckImplicitSpecialMemberDeclaration(S, CopyConstructor);
: ClassDecl->hasTrivialMoveConstructorForCall()));
// Note that we have declared this constructor.
- ++getASTContext().NumImplicitMoveConstructorsDeclared;
+ ++ASTContext::NumImplicitMoveConstructorsDeclared;
Scope *S = getScopeForContext(ClassDecl);
CheckImplicitSpecialMemberDeclaration(S, MoveConstructor);