[Mlir-commits] [mlir] d903fa4 - [mlir] Apply ClangTidyLegacy findings.

Adrian Kuegel llvmlistbot at llvm.org
Wed Oct 12 03:46:57 PDT 2022


Author: Adrian Kuegel
Date: 2022-10-12T12:46:41+02:00
New Revision: d903fa4c6273b3e0faae47926d61429fcd78d699

URL: https://github.com/llvm/llvm-project/commit/d903fa4c6273b3e0faae47926d61429fcd78d699
DIFF: https://github.com/llvm/llvm-project/commit/d903fa4c6273b3e0faae47926d61429fcd78d699.diff

LOG: [mlir] Apply ClangTidyLegacy findings.

Use '= default' to define a trivial default constructor.

Added: 
    

Modified: 
    mlir/include/mlir/IR/Attributes.h
    mlir/include/mlir/IR/IntegerSet.h
    mlir/include/mlir/IR/OpImplementation.h
    mlir/include/mlir/IR/Types.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h
index 2e74bcc28c555..a31560222ecf0 100644
--- a/mlir/include/mlir/IR/Attributes.h
+++ b/mlir/include/mlir/IR/Attributes.h
@@ -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)) {}
 

diff  --git a/mlir/include/mlir/IR/IntegerSet.h b/mlir/include/mlir/IR/IntegerSet.h
index 13982b6ffcfaf..b8affcae74e6e 100644
--- a/mlir/include/mlir/IR/IntegerSet.h
+++ b/mlir/include/mlir/IR/IntegerSet.h
@@ -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,

diff  --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h
index 0251394acba4b..474e9955bdcce 100644
--- a/mlir/include/mlir/IR/OpImplementation.h
+++ b/mlir/include/mlir/IR/OpImplementation.h
@@ -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;

diff  --git a/mlir/include/mlir/IR/Types.h b/mlir/include/mlir/IR/Types.h
index 18660cb9e6f5e..1c4db1b6c0f95 100644
--- a/mlir/include/mlir/IR/Types.h
+++ b/mlir/include/mlir/IR/Types.h
@@ -83,7 +83,7 @@ class Type {
 
   using AbstractTy = AbstractType;
 
-  constexpr Type() {}
+  constexpr Type() = default;
   /* implicit */ Type(const ImplType *impl)
       : impl(const_cast<ImplType *>(impl)) {}
 


        


More information about the Mlir-commits mailing list