diff --git a/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp b/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp index 8f8342a47ea8..d4aad9d904ca 100644 --- a/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp +++ b/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp @@ -124,7 +124,7 @@ namespace { // `shape.const_witness true`. class ConvertShapeConstraints : public ConvertShapeConstraintsBase<ConvertShapeConstraints> { - void runOnOperation() { + void runOnOperation() override { auto func = getOperation(); auto *context = &getContext(); diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp index a910d95d52c9..336c9111677b 100644 --- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp @@ -952,7 +952,7 @@ static void genCustomDirectiveParser(CustomDirective *dir, OpMethodBody &body) { body << llvm::formatv(" if ({0}Operand.hasValue())\n" " {0}Operands.push_back(*{0}Operand);\n", var->name); - } else if (auto *dir = dyn_cast<TypeRefDirective>(¶m)) { + } else if (isa<TypeRefDirective>(¶m)) { // In the `type_ref` case, do not parse a new Type that needs to be added. // Just do nothing here. } else if (auto *dir = dyn_cast<TypeDirective>(¶m)) {