From 622617aff16063ab8b658a34ae0f7beb3a41b31a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Aug 2022 21:28:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- taichi/ir/statements.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/taichi/ir/statements.h b/taichi/ir/statements.h index a006e99b12ca09..2a9c0a7aa59fa8 100644 --- a/taichi/ir/statements.h +++ b/taichi/ir/statements.h @@ -367,9 +367,11 @@ class PtrOffsetStmt : public Stmt { bool is_local_ptr() const { if (origin->is() || origin->is()) { - auto is_tensor_type = origin->ret_type->is() ? - origin->ret_type->cast()->get_pointee_type()->is() : - origin->ret_type->is(); + auto is_tensor_type = origin->ret_type->is() + ? origin->ret_type->cast() + ->get_pointee_type() + ->is() + : origin->ret_type->is(); TI_ASSERT_INFO(is_tensor_type, "PtrOffsetStmt can only be used for Alloca (TensorType)."); }