diff options
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 9c4fa12..89eb6d2 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1005,10 +1005,9 @@ getTypeExpansion(QualType Ty, const ASTContext &Context) { return std::make_unique<ConstantArrayExpansion>(AT->getElementType(), AT->getZExtSize()); } - if (const RecordType *RT = Ty->getAs<RecordType>()) { + if (const auto *RD = Ty->getAsRecordDecl()) { SmallVector<const CXXBaseSpecifier *, 1> Bases; SmallVector<const FieldDecl *, 1> Fields; - const RecordDecl *RD = RT->getOriginalDecl()->getDefinitionOrSelf(); assert(!RD->hasFlexibleArrayMember() && "Cannot expand structure with flexible array."); if (RD->isUnion()) { |