Skip to content

Commit 6abf5e5

Browse files
[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] ```
1 parent 6728207 commit 6abf5e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,8 +2953,7 @@ void OpEmitter::buildParamList(SmallVectorImpl<MethodParameter> &paramList,
29532953
operand->isOptional());
29542954
continue;
29552955
}
2956-
if ([[maybe_unused]] const auto *operand =
2957-
llvm::dyn_cast_if_present<NamedProperty *>(arg)) {
2956+
if (llvm::isa_and_present<NamedProperty *>(arg)) {
29582957
// TODO
29592958
continue;
29602959
}

0 commit comments

Comments
 (0)