[cfe-commits] r75662 - /cfe/trunk/lib/AST/DeclCXX.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Jul 14 11:57:06 PDT 2009
Author: fjahanian
Date: Tue Jul 14 13:56:31 2009
New Revision: 75662
URL: http://llvm.org/viewvc/llvm-project?rev=75662&view=rev
Log:
Support data members of array type in default
ctor-initializer AST build.
Modified:
cfe/trunk/lib/AST/DeclCXX.cpp
Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=75662&r1=75661&r2=75662&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Tue Jul 14 13:56:31 2009
@@ -540,8 +540,10 @@
}
}
if (i == NumInitializers) {
- // FIXME. What do we do with arrays?
QualType FieldType = C.getCanonicalType((*Field)->getType());
+ while (const ArrayType *AT = C.getAsArrayType(FieldType))
+ FieldType = AT->getElementType();
+
if (FieldType->getAsRecordType()) {
CXXBaseOrMemberInitializer *Member =
new CXXBaseOrMemberInitializer((*Field), 0, 0, SourceLocation());
More information about the cfe-commits
mailing list