diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-30 17:31:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-30 17:31:00 +0000 |
commit | ddb2485eb695802972c52ddf07dbf7ff2276dcd1 (patch) | |
tree | 68c44a10de06b083a425203e7d3aacb6334f9081 /clang/lib/Sema/SemaInit.cpp | |
parent | 221483dd4e6c4241d1ed0f1545bd97285c83a215 (diff) | |
download | bcm5719-llvm-ddb2485eb695802972c52ddf07dbf7ff2276dcd1.tar.gz bcm5719-llvm-ddb2485eb695802972c52ddf07dbf7ff2276dcd1.zip |
Switch Type::isAggregateType to use the C++ definition of "aggregate
type" rather than the C definition. We do this because both C99 and
Clang always use "aggregate type" as "aggregate or union type", and
the C++ definition includes union types.
llvm-svn: 63395
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 77679ee36f9..ed44acff7ee 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -287,8 +287,8 @@ void InitListChecker::CheckListElementTypes(InitListExpr *IList, CheckScalarType(IList, DeclType, Index, StructuredList, StructuredIndex); } else if (DeclType->isVectorType()) { CheckVectorType(IList, DeclType, Index, StructuredList, StructuredIndex); - } else if (DeclType->isAggregateType() || DeclType->isUnionType()) { - if (DeclType->isStructureType() || DeclType->isUnionType()) { + } else if (DeclType->isAggregateType()) { + if (DeclType->isRecordType()) { RecordDecl *RD = DeclType->getAsRecordType()->getDecl(); CheckStructUnionTypes(IList, DeclType, RD->field_begin(), SubobjectIsDesignatorContext, Index, |