From d7ee9c1510dc7b90457fd77c1cc4359492d416fa Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 2 Mar 2023 18:29:38 +0000 Subject: [PATCH] tint/sem: Add Declaration() override for IndexAccessorExpression Convenience overload to return ast::IndexAccessorExpression instead of ast::Expression Change-Id: Ib239fd6d5742425a629fc76e1b564a3c7781ca2a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122342 Reviewed-by: Dan Sinclair Commit-Queue: Ben Clayton Kokoro: Ben Clayton --- src/tint/sem/index_accessor_expression.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/tint/sem/index_accessor_expression.h b/src/tint/sem/index_accessor_expression.h index 2375a9d558..8118659367 100644 --- a/src/tint/sem/index_accessor_expression.h +++ b/src/tint/sem/index_accessor_expression.h @@ -17,13 +17,9 @@ #include +#include "src/tint/ast/index_accessor_expression.h" #include "src/tint/sem/value_expression.h" -// Forward declarations -namespace tint::ast { -class IndexAccessorExpression; -} // namespace tint::ast - namespace tint::sem { /// IndexAccessorExpression holds the semantic information for a ast::IndexAccessorExpression node. @@ -52,6 +48,11 @@ class IndexAccessorExpression final : public Castable(declaration_); + } + /// @returns the object expression that is being indexed ValueExpression const* Object() const { return object_; }