[Mlir-commits] [llvm] [mlir] Mark `mlir::Value::isa/dyn_cast/cast/...` member functions deprecated. (PR #89238)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Apr 18 07:52:14 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 694c444b5bbb56dcba8978d283fe5385237c309a 94a3d551ed4f7bec3277f74493c62d0deaad7a2b -- llvm/include/llvm/ADT/TypeSwitch.h mlir/examples/transform/Ch4/lib/MyExtension.cpp mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h mlir/include/mlir/IR/Value.h mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp mlir/lib/Dialect/Linalg/TransformOps/LinalgMatchOps.cpp mlir/lib/Dialect/MemRef/TransformOps/MemRefTransformOps.cpp mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp mlir/lib/Dialect/Mesh/Transforms/Spmdization.cpp mlir/lib/Dialect/Mesh/Transforms/Transforms.cpp mlir/lib/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp mlir/lib/Dialect/Tensor/IR/TensorOps.cpp mlir/lib/Dialect/Transform/IR/TransformOps.cpp mlir/test/lib/Dialect/Mesh/TestReshardingSpmdization.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/ADT/TypeSwitch.h b/llvm/include/llvm/ADT/TypeSwitch.h
index edd1f30384..2495855334 100644
--- a/llvm/include/llvm/ADT/TypeSwitch.h
+++ b/llvm/include/llvm/ADT/TypeSwitch.h
@@ -64,8 +64,7 @@ protected:
   /// Trait to check whether `ValueT` provides a 'dyn_cast' method with type
   /// `CastT`.
   template <typename ValueT, typename CastT>
-  using has_dyn_cast_t =
-      decltype(dyn_cast<CastT>(std::declval<ValueT &>()));
+  using has_dyn_cast_t = decltype(dyn_cast<CastT>(std::declval<ValueT &>()));
 
   /// Attempt to dyn_cast the given `value` to `CastT`. This overload is
   /// selected if `value` already has a suitable dyn_cast method.

``````````

</details>


https://github.com/llvm/llvm-project/pull/89238


More information about the Mlir-commits mailing list