summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-30 17:31:00 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-30 17:31:00 +0000
commitddb2485eb695802972c52ddf07dbf7ff2276dcd1 (patch)
tree68c44a10de06b083a425203e7d3aacb6334f9081 /clang/lib/Sema/SemaInit.cpp
parent221483dd4e6c4241d1ed0f1545bd97285c83a215 (diff)
downloadbcm5719-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.cpp4
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,
OpenPOWER on IntegriCloud