Apply clang-tidy fixes for modernize-use-equals-default to MLIR (NFC)

This commit is contained in:
Mehdi Amini 2022-01-14 01:35:35 +00:00
parent 59d8740f2f
commit 9940dcfa4a
14 changed files with 17 additions and 17 deletions

View File

@ -180,7 +180,7 @@ struct AliasAnalysisTraits {
/// querying into derived analysis implementations.
class Concept {
public:
virtual ~Concept() {}
virtual ~Concept() = default;
/// Given two values, return their aliasing behavior.
virtual AliasResult alias(Value lhs, Value rhs) = 0;

View File

@ -35,7 +35,7 @@ class AffineValueMap {
public:
// Creates an empty AffineValueMap (users should call 'reset' to reset map
// and operands).
AffineValueMap() {}
AffineValueMap() = default;
AffineValueMap(AffineMap map, ValueRange operands, ValueRange results = {});
~AffineValueMap();

View File

@ -67,7 +67,7 @@ std::unique_ptr<AllocationCallbacks> defaultAllocationCallbacks();
/// executed after the analysis, but before bufferization. They can be used to
/// implement custom dialect-specific optimizations.
struct PostAnalysisStep {
virtual ~PostAnalysisStep() {}
virtual ~PostAnalysisStep() = default;
/// Run the post analysis step. This function may modify the IR, but must keep
/// `aliasInfo` consistent. Newly created operations and operations that

View File

@ -120,7 +120,7 @@ public:
return isSigned ? qValue.getSExtValue() : qValue.getZExtValue();
}
virtual ~UniformQuantizedValueConverter() {}
virtual ~UniformQuantizedValueConverter() = default;
private:
// An optimized implementation to quantize f32 to i8/u8 with C++ native

View File

@ -39,7 +39,7 @@ class AffineMap {
public:
using ImplType = detail::AffineMapStorage;
constexpr AffineMap() {}
constexpr AffineMap() = default;
explicit AffineMap(ImplType *map) : map(map) {}
/// Returns a zero result affine map with no dimensions or symbols: () -> ().
@ -323,7 +323,7 @@ inline ::llvm::hash_code hash_value(AffineMap arg) {
/// A mutable affine map. Its affine expressions are however unique.
struct MutableAffineMap {
public:
MutableAffineMap() {}
MutableAffineMap() = default;
MutableAffineMap(AffineMap map);
ArrayRef<AffineExpr> getResults() const { return results; }

View File

@ -29,7 +29,7 @@ class ValueTypeRange;
class Block : public IRObjectWithUseList<BlockOperand>,
public llvm::ilist_node_with_parent<Block, Region> {
public:
explicit Block() {}
explicit Block() = default;
~Block();
void clear() {

View File

@ -109,7 +109,7 @@ private:
/// This allows for all iterator and element types to be completely
/// type-erased.
struct OpaqueIteratorBase {
virtual ~OpaqueIteratorBase() {}
virtual ~OpaqueIteratorBase() = default;
virtual std::unique_ptr<OpaqueIteratorBase> clone() const = 0;
};
/// This class is used to represent the abstract base of an opaque iterator

View File

@ -33,7 +33,7 @@ class PatternBenefit {
enum { ImpossibleToMatchSentinel = 65535 };
public:
PatternBenefit() {}
PatternBenefit() = default;
PatternBenefit(unsigned benefit);
PatternBenefit(const PatternBenefit &) = default;
PatternBenefit &operator=(const PatternBenefit &) = default;
@ -243,7 +243,7 @@ private:
///
class RewritePattern : public Pattern {
public:
virtual ~RewritePattern() {}
virtual ~RewritePattern() = default;
/// Rewrite the IR rooted at the specified operation with the result of
/// this pattern, generating any new operations with the specified

View File

@ -77,7 +77,7 @@ private:
/// class represents an abstract interface for a given resource.
class Resource {
public:
virtual ~Resource() {}
virtual ~Resource() = default;
/// This base class is used for derived effects that are non-parametric.
template <typename DerivedResource, typename BaseResource = Resource>

View File

@ -48,7 +48,7 @@ public:
/// This class represents the base class of a debug action handler.
class HandlerBase {
public:
virtual ~HandlerBase() {}
virtual ~HandlerBase() = default;
/// Return the unique handler id of this handler, use for casting
/// functionality.

View File

@ -184,8 +184,8 @@ private:
/// manager implementations.
class Timer {
public:
Timer() {}
Timer(const Timer &other) : tm(other.tm), handle(other.handle) {}
Timer() = default;
Timer(const Timer &other) = default;
Timer(Timer &&other) : Timer(other) {
other.tm = nullptr;
other.handle = nullptr;

View File

@ -191,7 +191,7 @@ public:
/// Common CRTP base class for ModuleTranslation stack frames.
class StackFrame {
public:
virtual ~StackFrame() {}
virtual ~StackFrame() = default;
TypeID getTypeID() const { return typeID; }
protected:

View File

@ -56,7 +56,7 @@ public:
}
PyObjectRef(const PyObjectRef &other)
: referrent(other.referrent), object(other.object /* copies */) {}
~PyObjectRef() {}
~PyObjectRef() = default;
int getRefCount() {
if (!object)

View File

@ -27,7 +27,7 @@ class AsmParserImpl : public BaseT {
public:
AsmParserImpl(llvm::SMLoc nameLoc, Parser &parser)
: nameLoc(nameLoc), parser(parser) {}
~AsmParserImpl() override {}
~AsmParserImpl() override = default;
/// Return the location of the original name token.
llvm::SMLoc getNameLoc() const override { return nameLoc; }