Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 21, 2023

Conversation

lipracer
Copy link
Member

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

This reverts commit 82ae83a.

@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Oct 10, 2023
@llvmbot
Copy link
Member

llvmbot commented Oct 10, 2023

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-core

Author: long.chen (lipracer)

Changes

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

This reverts commit 82ae83a.


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 --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);

Copy link
Contributor

@rkayaith rkayaith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:core MLIR Core Infrastructure mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants