[Mlir-commits] [mlir] [mlir][NFC] Silence -Wunused-but-set-parameter warnings. (PR #83619)
Slava Zakharin
llvmlistbot at llvm.org
Fri Mar 1 12:39:44 PST 2024
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/83619
None
>From 995d71346f0919f6df4a700525412f720e7dadec Mon Sep 17 00:00:00 2001
From: Slava Zakharin <szakharin at nvidia.com>
Date: Fri, 1 Mar 2024 12:38:18 -0800
Subject: [PATCH] [mlir][NFC] Silence -Wunused-but-set-parameter warnings.
---
mlir/include/mlir/IR/Attributes.h | 2 +-
mlir/include/mlir/IR/Types.h | 2 +-
mlir/include/mlir/IR/Value.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
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>) {
More information about the Mlir-commits
mailing list