[Mlir-commits] [mlir] 6abf5e5 - [MLIR] NFC: Change dyn_cast to isa to prevent warning (#81899)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Feb 15 23:14:18 PST 2024
Author: Kiran Chandramohan
Date: 2024-02-16T07:14:13Z
New Revision: 6abf5e5be2be8834183163f1db33a6cff696f13e
URL: https://github.com/llvm/llvm-project/commit/6abf5e5be2be8834183163f1db33a6cff696f13e
DIFF: https://github.com/llvm/llvm-project/commit/6abf5e5be2be8834183163f1db33a6cff696f13e.diff
LOG: [MLIR] NFC: Change dyn_cast to isa to prevent warning (#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]
```
Added:
Modified:
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Removed:
################################################################################
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