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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 20 20:15:08 PDT 2023


Author: long.chen
Date: 2023-10-21T11:15:04+08:00
New Revision: c000bd4e40166fc61fe5ebbcf4abc64075b82435

URL: https://github.com/llvm/llvm-project/commit/c000bd4e40166fc61fe5ebbcf4abc64075b82435
DIFF: https://github.com/llvm/llvm-project/commit/c000bd4e40166fc61fe5ebbcf4abc64075b82435.diff

LOG: Revert "[mlir] Silence a few -Wunused-but-set-parameter warnings" (#68667)

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

This reverts commit 82ae83a8487df0747195d1abbda11920fda11eb8.

Added: 
    

Modified: 
    mlir/include/mlir/IR/Attributes.h
    mlir/include/mlir/IR/Types.h
    mlir/include/mlir/IR/Value.h

Removed: 
    


################################################################################
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