diff --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp --- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp +++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp @@ -651,7 +651,6 @@ struct ConvertVectorToSCFPass : public ConvertVectorToSCFBase { ConvertVectorToSCFPass() = default; - ConvertVectorToSCFPass(const ConvertVectorToSCFPass &pass) {} ConvertVectorToSCFPass(const VectorTransferToSCFOptions &options) { this->fullUnroll = options.unroll; } diff --git a/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp b/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp @@ -101,7 +101,7 @@ })); }; return *this; -}; +} /// Linalg base tiling pattern. mlir::linalg::LinalgBaseTilingPattern::LinalgBaseTilingPattern( diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp --- a/mlir/lib/Dialect/Shape/IR/Shape.cpp +++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp @@ -187,7 +187,7 @@ return success(); } }; -}; // namespace +} // namespace void AssumingOp::getCanonicalizationPatterns(OwningRewritePatternList &patterns, MLIRContext *context) { diff --git a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp --- a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp +++ b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp @@ -846,9 +846,8 @@ }; explicit Expression(Kind k = Kind::Uninitialized) : kind(k) {} - virtual ~Expression() = 0; + virtual ~Expression() = default; - bool operator==(const Expression &e) const; operator bool() const { return kind != Kind::Uninitialized; } Kind kind; @@ -930,20 +929,6 @@ SetVector reductionDimensions; }; -Expression::~Expression() {} - -bool Expression::operator==(const Expression &e) const { - if (this->kind != e.kind) - return false; - if (e.kind == Expression::Kind::TensorUse) - return static_cast(*this) == - static_cast(e); - if (e.kind == Expression::Kind::TensorExpr) - return static_cast(*this) == - static_cast(e); - llvm_unreachable("Unexpected case"); -} - /// This is a specialized parser for a TCDef. /// This maintains the dims it finds in an eager fashion. class TCParser {