aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorThomas Young <wenzhang5800@gmail.com>2022-05-29 13:00:00 +0800
committerThomas Young <wenzhang5800@gmail.com>2022-05-29 13:00:00 +0800
commitb2fb51a2640b2529869542a305afba42cd83ff03 (patch)
tree7c54ccb1d94cf7aa86ca8ac92e0f3736e657e978 /gcc/rust
parent7a94948e65db2fef6fd93c94e70ead168b71513d (diff)
downloadgcc-b2fb51a2640b2529869542a305afba42cd83ff03.zip
gcc-b2fb51a2640b2529869542a305afba42cd83ff03.tar.gz
gcc-b2fb51a2640b2529869542a305afba42cd83ff03.tar.bz2
Marklive: support arrayindex
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/lint/rust-lint-marklive.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/lint/rust-lint-marklive.h b/gcc/rust/lint/rust-lint-marklive.h
index 529afa6..ef37e17 100644
--- a/gcc/rust/lint/rust-lint-marklive.h
+++ b/gcc/rust/lint/rust-lint-marklive.h
@@ -78,6 +78,12 @@ public:
expr.get_internal_elements ()->accept_vis (*this);
}
+ void visit (HIR::ArrayIndexExpr &expr) override
+ {
+ expr.get_array_expr ()->accept_vis (*this);
+ expr.get_index_expr ()->accept_vis (*this);
+ }
+
void visit (HIR::ArrayElemsValues &expr) override
{
for (auto &elem : expr.get_values ())