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 | d7eb846aaf5ee4a8d22c3cd0796d1e7229d46013 (patch) | |
tree | 89fd006a550aa30da3e6d051578e16e784e7e5c8 /lib/Sema/SemaInit.cpp | |
parent | 6cd586d2668653501ecd73d53e81cbc76db3a18c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 77679ee36f..ed44acff7e 100644 --- a/lib/Sema/SemaInit.cpp +++ b/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, |