[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:43:34 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core
Author: long.chen (lipracer)
<details>
<summary>Changes</summary>
A cmake patch append compile options `-Wno-unused-but-set-parameter` is merged.
This reverts commit 82ae83a8487df0747195d1abbda11920fda11eb8.
---
Full diff: https://github.com/llvm/llvm-project/pull/68667.diff
3 Files Affected:
- (modified) mlir/include/mlir/IR/Attributes.h (-1)
- (modified) mlir/include/mlir/IR/Types.h (-1)
- (modified) mlir/include/mlir/IR/Value.h (-1)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/68667
More information about the Mlir-commits
mailing list