Skip to content

Commit 6279d2e

Browse files
committed
AArch64ABIInfo::passAsAggregateType - don't directly dereference getAs<> result. NFC.
Reported by coverity static analyzer - we know the type is a BuiltinType so use castAs<>
1 parent ddef380 commit 6279d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/Targets/AArch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ bool AArch64ABIInfo::isZeroLengthBitfieldPermittedInHomogeneousAggregate()
662662

663663
bool AArch64ABIInfo::passAsAggregateType(QualType Ty) const {
664664
if (Kind == AArch64ABIKind::AAPCS && Ty->isSVESizelessBuiltinType()) {
665-
const auto *BT = Ty->getAs<BuiltinType>();
665+
const auto *BT = Ty->castAs<BuiltinType>();
666666
return !BT->isSVECount() &&
667667
getContext().getBuiltinVectorTypeInfo(BT).NumVectors > 1;
668668
}

0 commit comments

Comments
 (0)