diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp index 5c5303e27fde..10a162f81ba1 100644 --- a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp @@ -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(arg)) + if (isa(arg)) genVariableParser(param, ctx, os.indent()); else if (auto custom = dyn_cast(arg)) genCustomParser(custom, ctx, os.indent());