]> granicus.if.org Git - clang/commitdiff
Provide a default constructor for ObjCInterfaceDecl::DefinitionData
authorDouglas Gregor <dgregor@apple.com>
Thu, 15 Dec 2011 16:51:02 +0000 (16:51 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 15 Dec 2011 16:51:02 +0000 (16:51 +0000)
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

include/clang/AST/DeclObjC.h

index 06fa4cb11e36c4dd8e6574337c885ef22bd579ab..db880eb2eaf744050a62c8b5bbe0dc793101a833 100644 (file)
@@ -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,