[mlir] Fix a warning

This patch fixes:

  mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp:586:14: error:
  variable 'realParam' set but not used
  [-Werror,-Wunused-but-set-variable]
This commit is contained in:
Kazu Hirata
2025-05-01 12:34:55 -07:00
parent 2bff80f25d
commit 441b68370a

View File

@@ -583,7 +583,7 @@ void DefFormat::genStructParser(StructDirective *el, FmtContext &ctx,
for (FormatElement *arg : el->getElements()) {
ParameterElement *param = getEncapsulatedParameterElement(arg);
os.getStream().printReindented(strfmt(checkParamKey, param->getName()));
if (auto realParam = dyn_cast<ParameterElement>(arg))
if (isa<ParameterElement>(arg))
genVariableParser(param, ctx, os.indent());
else if (auto custom = dyn_cast<CustomDirective>(arg))
genCustomParser(custom, ctx, os.indent());