Skip to content

Commit

Permalink
[mlir] Apply ClangTidyLegacy findings.
Browse files Browse the repository at this point in the history
Use '= default' to define a trivial default constructor.
  • Loading branch information
akuegel committed Oct 12, 2022
1 parent 02b5d3b commit d903fa4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/Attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Attribute {
using ValueType = void;
using AbstractTy = AbstractAttribute;

constexpr Attribute() {}
constexpr Attribute() = default;
/* implicit */ Attribute(const ImplType *impl)
: impl(const_cast<ImplType *>(impl)) {}

Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/IntegerSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class IntegerSet {
public:
using ImplType = detail::IntegerSetStorage;

constexpr IntegerSet() {}
constexpr IntegerSet() = default;
explicit IntegerSet(ImplType *set) : set(set) {}

static IntegerSet get(unsigned dimCount, unsigned symbolCount,
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/OpImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class AsmPrinter {
protected:
/// Initialize the printer with no internal implementation. In this case, all
/// virtual methods of this class must be overriden.
AsmPrinter() {}
AsmPrinter() = default;

private:
AsmPrinter(const AsmPrinter &) = delete;
Expand Down
2 changes: 1 addition & 1 deletion mlir/include/mlir/IR/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Type {

using AbstractTy = AbstractType;

constexpr Type() {}
constexpr Type() = default;
/* implicit */ Type(const ImplType *impl)
: impl(const_cast<ImplType *>(impl)) {}

Expand Down

0 comments on commit d903fa4

Please sign in to comment.