Skip to content

Commit 441b683

Browse files
[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]
1 parent 2bff80f commit 441b683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ void DefFormat::genStructParser(StructDirective *el, FmtContext &ctx,
583583
for (FormatElement *arg : el->getElements()) {
584584
ParameterElement *param = getEncapsulatedParameterElement(arg);
585585
os.getStream().printReindented(strfmt(checkParamKey, param->getName()));
586-
if (auto realParam = dyn_cast<ParameterElement>(arg))
586+
if (isa<ParameterElement>(arg))
587587
genVariableParser(param, ctx, os.indent());
588588
else if (auto custom = dyn_cast<CustomDirective>(arg))
589589
genCustomParser(custom, ctx, os.indent());

0 commit comments

Comments
 (0)