@@ -269,6 +269,7 @@ class CXXRecordDecl : public RecordDecl {
269269
270270 friend void FunctionDecl::setIsPureVirtual (bool );
271271 friend void TagDecl::startDefinition ();
272+ friend void FieldDecl::removeInClassInitializer ();
272273
273274 // / Values used in DefinitionData fields to represent special members.
274275 enum SpecialMemberFlags {
@@ -319,6 +320,9 @@ class CXXRecordDecl : public RecordDecl {
319320 // / The number of virtual base class specifiers in VBases.
320321 unsigned NumVBases = 0 ;
321322
323+ // / The number of C++11 in-class-initializers in this class.
324+ unsigned NumInClassInitializers = 0 ;
325+
322326 // / Base classes of this class.
323327 // /
324328 // / FIXME: This is wasted space for a union.
@@ -497,6 +501,17 @@ class CXXRecordDecl : public RecordDecl {
497501 // / whenever a member is added to this record.
498502 void addedMember (Decl *D);
499503
504+ // / Decreasing the number of C++11 in-class-initializers, and update the
505+ // / HasInClassInitializer if there is no in-class-initializer in this class.
506+ // /
507+ // / This routine helps maintain the number of C++11 in-class-initializers.
508+ // / The RecordDecl::hasInClassInitializer() needs to be consistent with the
509+ // / FieldDecl::hasInClassInitializer(), When calling
510+ // / FieldDecl::hasInClassInitializer() to remove the in-class-initializer in
511+ // / the field, we need to check whether there are any in-class-initializers in
512+ // / this class, and update HasInClassInitializer to the correct value.
513+ void removeInClassInitializer ();
514+
500515 void markedVirtualFunctionPure ();
501516
502517 // / Get the head of our list of friend declarations, possibly
0 commit comments