From 0cd830c5718ff942c817319e8b399722eb9d6be2 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 5 Sep 2022 10:43:03 +0000 Subject: [PATCH] tint: Fix type is_signed_integer helpers which were ignoring abstracts Abstracts are now considered scalars, so these should be returning true for abstract-integers. Change-Id: If15f87932d412663d2aef4f9737675a8ece9e551 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101181 Reviewed-by: Antonio Maiorano Commit-Queue: Ben Clayton --- src/tint/sem/type.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tint/sem/type.cc b/src/tint/sem/type.cc index b4887dd90e..ccc414131c 100644 --- a/src/tint/sem/type.cc +++ b/src/tint/sem/type.cc @@ -105,7 +105,7 @@ bool Type::is_integer_scalar() const { } bool Type::is_signed_integer_scalar() const { - return Is(); + return IsAnyOf(); } bool Type::is_unsigned_integer_scalar() const { @@ -113,7 +113,7 @@ bool Type::is_unsigned_integer_scalar() const { } bool Type::is_signed_integer_vector() const { - return Is([](const Vector* v) { return v->type()->IsAnyOf(); }); + return Is([](const Vector* v) { return v->type()->IsAnyOf(); }); } bool Type::is_unsigned_integer_vector() const { @@ -125,7 +125,7 @@ bool Type::is_unsigned_scalar_or_vector() const { } bool Type::is_signed_scalar_or_vector() const { - return Is() || is_signed_integer_vector(); + return IsAnyOf() || is_signed_integer_vector(); } bool Type::is_integer_scalar_or_vector() const {