[Mlir-commits] [mlir] Revert "[mlir] Silence a few -Wunused-but-set-parameter warnings" (PR #68667)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Oct 11 19:34:50 PDT 2023


https://github.com/lipracer updated https://github.com/llvm/llvm-project/pull/68667

>From 5e94f15221e31bfb9688037fd922340ff6a0b899 Mon Sep 17 00:00:00 2001
From: lipracer <lipracer at gmail.com>
Date: Tue, 10 Oct 2023 14:29:04 +0800
Subject: [PATCH] Revert "[mlir] Silence a few -Wunused-but-set-parameter
 warnings"

This reverts commit 82ae83a8487df0747195d1abbda11920fda11eb8.
---
 mlir/include/mlir/IR/Attributes.h | 1 -
 mlir/include/mlir/IR/Types.h      | 1 -
 mlir/include/mlir/IR/Value.h      | 1 -
 3 files changed, 3 deletions(-)

diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h
index ac5dd49f0ba3970..f433363e5dedec6 100644
--- a/mlir/include/mlir/IR/Attributes.h
+++ b/mlir/include/mlir/IR/Attributes.h
@@ -409,7 +409,6 @@ struct CastInfo<To, From,
     /// 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>) {
-      (void)ty;
       return true;
     } else {
       return To::classof(ty);
diff --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h
index 832794928a44198..46bb733101c1271 100644
--- a/mlir/include/mlir/IR/Types.h
+++ b/mlir/include/mlir/IR/Types.h
@@ -406,7 +406,6 @@ struct CastInfo<
     /// 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>) {
-      (void)ty;
       return true;
     } else {
       return To::classof(ty);
diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h
index 4e550fe3e3a60e6..dbcc10d4f4df80e 100644
--- a/mlir/include/mlir/IR/Value.h
+++ b/mlir/include/mlir/IR/Value.h
@@ -605,7 +605,6 @@ struct CastInfo<
     /// 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>) {
-      (void)ty;
       return true;
     } else {
       return To::classof(ty);



More information about the Mlir-commits mailing list