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.

llvm-svn: 146658

clang/include/clang/AST/DeclObjC.h

index 06fa4cb..db880eb 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,