From: Douglas Gregor Date: Thu, 15 Dec 2011 16:51:02 +0000 (+0000) Subject: Provide a default constructor for ObjCInterfaceDecl::DefinitionData X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=161794732195881c33305f701f6e58721998541f;p=clang Provide a default constructor for ObjCInterfaceDecl::DefinitionData that value-initializes all of its members for which default-initialization does not suffice. This should clean up the failures for compilers that do not implement C++ DR543: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#543 and, therefore, implement very unfortunate semantics for value-initialization of classes with implicitly-declared, non-trivial default constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146658 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 06fa4cb11e..db880eb2ea 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -572,6 +572,9 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { mutable bool ExternallyCompleted : 1; SourceLocation SuperClassLoc; // location of the super class identifier. + + DefinitionData() : SuperClass(), CategoryList(), IvarList(), + ExternallyCompleted() { } }; ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id,