[Mlir-commits] [mlir] [mlir][NFC] Silence -Wunused-but-set-parameter warnings. (PR #83619)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Mar 1 12:40:10 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: Slava Zakharin (vzakhari)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/83619.diff
3 Files Affected:
- (modified) mlir/include/mlir/IR/Attributes.h (+1-1)
- (modified) mlir/include/mlir/IR/Types.h (+1-1)
- (modified) mlir/include/mlir/IR/Value.h (+1-1)
``````````diff
diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h
index cc0cee6a31183c..9d5cc36a32718e 100644
--- a/mlir/include/mlir/IR/Attributes.h
+++ b/mlir/include/mlir/IR/Attributes.h
@@ -409,7 +409,7 @@ struct CastInfo<To, From,
/// returns the dynamic ID. This means that T::classof would end up comparing
/// the static TypeID of the children to the static TypeID of its parent,
/// making it impossible to downcast from the parent to the child.
- static inline bool isPossible(mlir::Attribute ty) {
+ static inline bool isPossible([[maybe_unused]] mlir::Attribute ty) {
/// Return a constant true instead of a dynamic true when casting to self or
/// up the hierarchy.
if constexpr (std::is_base_of_v<To, From>) {
diff --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h
index 46bb733101c127..f865d29de44be3 100644
--- a/mlir/include/mlir/IR/Types.h
+++ b/mlir/include/mlir/IR/Types.h
@@ -402,7 +402,7 @@ struct CastInfo<
/// ID. This means that T::classof would end up comparing the static TypeID of
/// the children to the static TypeID of its parent, making it impossible to
/// downcast from the parent to the child.
- static inline bool isPossible(mlir::Type ty) {
+ static inline bool isPossible([[maybe_unused]] mlir::Type ty) {
/// Return a constant true instead of a dynamic true when casting to self or
/// up the hierarchy.
if constexpr (std::is_base_of_v<To, From>) {
diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h
index a74d0faa1dfc4b..d97a58578d4824 100644
--- a/mlir/include/mlir/IR/Value.h
+++ b/mlir/include/mlir/IR/Value.h
@@ -603,7 +603,7 @@ struct CastInfo<
/// that returns the dynamic type. This means that T::classof would end up
/// comparing the static Kind of the children to the static Kind of its
/// parent, making it impossible to downcast from the parent to the child.
- static inline bool isPossible(mlir::Value ty) {
+ static inline bool isPossible([[maybe_unused]] mlir::Value ty) {
/// Return a constant true instead of a dynamic true when casting to self or
/// up the hierarchy.
if constexpr (std::is_base_of_v<To, From>) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/83619
More information about the Mlir-commits
mailing list