Skip to content

Commit 0708500

Browse files
committed
[Clang] Remove bogus assert in are[Lax]CompatibleSveTypes()
This caused an assertion failure for the following input: __SVInt32_t bar(__SVInt32_t x); void foo(__SVInt32_t x) { return bar(x); }
1 parent 4464599 commit 0708500

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9554,11 +9554,6 @@ static uint64_t getSVETypeSize(ASTContext &Context, const BuiltinType *Ty) {
95549554

95559555
bool ASTContext::areCompatibleSveTypes(QualType FirstType,
95569556
QualType SecondType) {
9557-
assert(
9558-
((FirstType->isSVESizelessBuiltinType() && SecondType->isVectorType()) ||
9559-
(FirstType->isVectorType() && SecondType->isSVESizelessBuiltinType())) &&
9560-
"Expected SVE builtin type and vector type!");
9561-
95629557
auto IsValidCast = [this](QualType FirstType, QualType SecondType) {
95639558
if (const auto *BT = FirstType->getAs<BuiltinType>()) {
95649559
if (const auto *VT = SecondType->getAs<VectorType>()) {
@@ -9584,11 +9579,6 @@ bool ASTContext::areCompatibleSveTypes(QualType FirstType,
95849579

95859580
bool ASTContext::areLaxCompatibleSveTypes(QualType FirstType,
95869581
QualType SecondType) {
9587-
assert(
9588-
((FirstType->isSVESizelessBuiltinType() && SecondType->isVectorType()) ||
9589-
(FirstType->isVectorType() && SecondType->isSVESizelessBuiltinType())) &&
9590-
"Expected SVE builtin type and vector type!");
9591-
95929582
auto IsLaxCompatible = [this](QualType FirstType, QualType SecondType) {
95939583
const auto *BT = FirstType->getAs<BuiltinType>();
95949584
if (!BT)

0 commit comments

Comments
 (0)