[cfe-commits] r146658 - /cfe/trunk/include/clang/AST/DeclObjC.h

Douglas Gregor dgregor at apple.com
Thu Dec 15 08:51:02 PST 2011


Author: dgregor
Date: Thu Dec 15 10:51:02 2011
New Revision: 146658

URL: http://llvm.org/viewvc/llvm-project?rev=146658&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=146658&r1=146657&r2=146658&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Thu Dec 15 10:51:02 2011
@@ -572,6 +572,9 @@
     mutable bool ExternallyCompleted : 1;
 
     SourceLocation SuperClassLoc; // location of the super class identifier.
+    
+    DefinitionData() : SuperClass(), CategoryList(), IvarList(), 
+                       ExternallyCompleted() { }
   };
 
   ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id,





More information about the cfe-commits mailing list