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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Oct 9 23:42:31 PDT 2023


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

A cmake patch append compile options `-Wno-unused-but-set-parameter` is merged.

This reverts commit 82ae83a8487df0747195d1abbda11920fda11eb8.

>From ad46f51e0caf9dce02d14853938bfc0d95fdd642 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