Support data members of array type in default

ctor-initializer AST build.

llvm-svn: 75662
This commit is contained in:
Fariborz Jahanian 2009-07-14 18:56:31 +00:00
parent 3d50c2cfb4
commit c75e143709
1 changed files with 3 additions and 1 deletions

View File

@ -540,8 +540,10 @@ CXXConstructorDecl::setBaseOrMemberInitializers(
}
}
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());