[llvm] 68ff493 - [NFC] Fixed some D79714 warnings

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 25 12:42:02 PDT 2021


Author: Vitaly Buka
Date: 2021-04-25T12:41:46-07:00
New Revision: 68ff493dfc950c05c102e09e14a16d06253ffa16

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

LOG: [NFC] Fixed some D79714 warnings

Added: 
    

Modified: 
    clang/include/clang/Basic/OpenCLOptions.h
    llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
    mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    mlir/include/mlir/Support/TypeID.h
    mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/OpenCLOptions.h b/clang/include/clang/Basic/OpenCLOptions.h
index 703b5ac48094..17923d2b8d3c 100644
--- a/clang/include/clang/Basic/OpenCLOptions.h
+++ b/clang/include/clang/Basic/OpenCLOptions.h
@@ -154,7 +154,6 @@ class OpenCLOptions {
   void support(llvm::StringRef Ext, bool V = true);
 
   OpenCLOptions();
-  OpenCLOptions(const OpenCLOptions &) = default;
 
   // Set supported options based on target settings and language version
   void addSupport(const llvm::StringMap<bool> &FeaturesMap,

diff  --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
index d210fd909290..e1c2c50be773 100644
--- a/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
+++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h
@@ -1380,6 +1380,12 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
 // To learn more about using these macros, please search for 'MATCHER'
 // on http://code.google.com/p/googlemock/wiki/CookBook.
 
+#define GTEST_DISALLOW_ASSIGN_MATCHER_(type)\
+public:\
+  type(type const &) = default;\
+private:\
+  void operator=(type const &) = delete;
+
 #define MATCHER(name, description)\
   class name##Matcher {\
    public:\
@@ -1416,7 +1422,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     name##Matcher() {\
     }\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##Matcher);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##Matcher);\
   };\
   inline name##Matcher name() {\
     return name##Matcher();\
@@ -1466,7 +1472,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     }\
     p0##_type p0;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP);\
   };\
   template <typename p0##_type>\
   inline name##MatcherP<p0##_type> name(p0##_type p0) {\
@@ -1521,7 +1527,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p0##_type p0;\
     p1##_type p1;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP2);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP2);\
   };\
   template <typename p0##_type, typename p1##_type>\
   inline name##MatcherP2<p0##_type, p1##_type> name(p0##_type p0, \
@@ -1581,7 +1587,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p1##_type p1;\
     p2##_type p2;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP3);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP3);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type>\
   inline name##MatcherP3<p0##_type, p1##_type, p2##_type> name(p0##_type p0, \
@@ -1646,7 +1652,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p2##_type p2;\
     p3##_type p3;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP4);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP4);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type>\
@@ -1719,7 +1725,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p3##_type p3;\
     p4##_type p4;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP5);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP5);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type, typename p4##_type>\
@@ -1794,7 +1800,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p4##_type p4;\
     p5##_type p5;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP6);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP6);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type, typename p4##_type, typename p5##_type>\
@@ -1875,7 +1881,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p5##_type p5;\
     p6##_type p6;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP7);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP7);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -1962,7 +1968,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p6##_type p6;\
     p7##_type p7;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP8);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP8);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -2054,7 +2060,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p7##_type p7;\
     p8##_type p8;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP9);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP9);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type, typename p4##_type, typename p5##_type, \
@@ -2151,7 +2157,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
     p8##_type p8;\
     p9##_type p9;\
    private:\
-    GTEST_DISALLOW_ASSIGN_(name##MatcherP10);\
+    GTEST_DISALLOW_ASSIGN_MATCHER_(name##MatcherP10);\
   };\
   template <typename p0##_type, typename p1##_type, typename p2##_type, \
       typename p3##_type, typename p4##_type, typename p5##_type, \

diff  --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
index 2338198b5f2e..8c5e61862987 100644
--- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
+++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
@@ -129,7 +129,6 @@ struct TiledLinalgOp {
   LinalgOp op;
   SmallVector<Operation *, 8> loops;
   SmallVector<Value, 4> tensorResults;
-  TiledLinalgOp &operator=(const TiledLinalgOp &) = default;
 };
 Optional<TiledLinalgOp> tileLinalgOp(OpBuilder &b, LinalgOp op,
                                      const LinalgTilingOptions &options);

diff  --git a/mlir/include/mlir/Support/TypeID.h b/mlir/include/mlir/Support/TypeID.h
index fb8a2215b669..2e4d8b9e8377 100644
--- a/mlir/include/mlir/Support/TypeID.h
+++ b/mlir/include/mlir/Support/TypeID.h
@@ -57,7 +57,6 @@ class TypeID {
 
 public:
   TypeID() : TypeID(get<void>()) {}
-  TypeID(const TypeID &) = default;
 
   /// Comparison operations.
   bool operator==(const TypeID &other) const {

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
index 6cee4d672818..755c92fd7caa 100644
--- a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
+++ b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
@@ -999,7 +999,6 @@ struct TensorUse : public Expression {
   TensorUse() : TensorUse("", AffineMap()) {}
   TensorUse(StringRef name, AffineMap map)
       : Expression(Kind::TensorUse), tensorId(name), indexingMap(map) {}
-  TensorUse(const TensorUse &use) = default;
 
   static bool classof(const Expression *e) {
     return e->kind == Kind::TensorUse;


        


More information about the llvm-commits mailing list