[Mlir-commits] [mlir] [MLIR] NFC: Change dyn_cast to isa to prevent warning (PR #81899)
Kiran Chandramohan
llvmlistbot at llvm.org
Thu Feb 15 10:48:23 PST 2024
https://github.com/kiranchandramohan created https://github.com/llvm/llvm-project/pull/81899
This is to avoid warnings when invoked from the flang documentation generation build.
The warning can be seen in the CI (https://lab.llvm.org/buildbot/#/builders/89/builds/57451).
```
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp:2956:38: warning: unused variable ‘operand’ [-Wunused-variable]
```
>From d942aeb713a62ebfaac052346693838aa217f767 Mon Sep 17 00:00:00 2001
From: Kiran Chandramohan <kiran.chandramohan at arm.com>
Date: Thu, 15 Feb 2024 18:04:49 +0000
Subject: [PATCH] [MLIR] NFC: Change dyn_cast to isa to prevent warning
---
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 71326049af0579..0d81912afb6158 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -2953,8 +2953,7 @@ void OpEmitter::buildParamList(SmallVectorImpl<MethodParameter> ¶mList,
operand->isOptional());
continue;
}
- if ([[maybe_unused]] const auto *operand =
- llvm::dyn_cast_if_present<NamedProperty *>(arg)) {
+ if (llvm::isa_and_present<NamedProperty *>(arg)) {
// TODO
continue;
}
More information about the Mlir-commits
mailing list