Replace ConstructorExpression::(Is|As)* with Castable

Change-Id: I18e9768fef36b79cb0e65c6eb79fd147013c54f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34317
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-11-30 23:30:58 +00:00
parent d6ae990811
commit 19fe07236e
15 changed files with 26 additions and 72 deletions

View File

@@ -150,9 +150,9 @@ bool BoundArrayAccessorsTransform::ProcessExpression(ast::Expression* expr) {
}
} else if (expr->Is<ast::IdentifierExpression>()) {
/* nop */
} else if (auto* c = expr->As<ast::ConstructorExpression>()) {
if (c->IsTypeConstructor()) {
for (auto* e : c->AsTypeConstructor()->values()) {
} else if (expr->Is<ast::ConstructorExpression>()) {
if (auto* c = expr->As<ast::TypeConstructorExpression>()) {
for (auto* e : c->values()) {
if (!ProcessExpression(e)) {
return false;
}