diff options
3 files changed, 81 insertions, 80 deletions
diff --git a/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h index 8e17468a2cf..32377991f64 100644 --- a/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h +++ b/llvm/utils/unittest/googlemock/include/gmock/gmock-actions.h @@ -368,7 +368,8 @@ class Action { explicit Action(ActionInterface<F>* impl) : impl_(impl) {} // Copy constructor. - Action(const Action& action) : impl_(action.impl_) {} + Action(const Action &action) = default; + Action &operator=(const Action &action) = default; // This constructor allows us to turn an Action<Func> object into an // Action<F>, as long as F's arguments can be implicitly converted diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h index 4d1d81d20ff..f6b8429e410 100644 --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h @@ -86,7 +86,7 @@ class ValueArray1 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray1& other); + void operator=(const ValueArray1& other) = delete; const T1 v1_; }; @@ -104,7 +104,7 @@ class ValueArray2 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray2& other); + void operator=(const ValueArray2& other) = delete; const T1 v1_; const T2 v2_; @@ -124,7 +124,7 @@ class ValueArray3 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray3& other); + void operator=(const ValueArray3& other) = delete; const T1 v1_; const T2 v2_; @@ -146,7 +146,7 @@ class ValueArray4 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray4& other); + void operator=(const ValueArray4& other) = delete; const T1 v1_; const T2 v2_; @@ -169,7 +169,7 @@ class ValueArray5 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray5& other); + void operator=(const ValueArray5& other) = delete; const T1 v1_; const T2 v2_; @@ -195,7 +195,7 @@ class ValueArray6 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray6& other); + void operator=(const ValueArray6& other) = delete; const T1 v1_; const T2 v2_; @@ -222,7 +222,7 @@ class ValueArray7 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray7& other); + void operator=(const ValueArray7& other) = delete; const T1 v1_; const T2 v2_; @@ -251,7 +251,7 @@ class ValueArray8 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray8& other); + void operator=(const ValueArray8& other) = delete; const T1 v1_; const T2 v2_; @@ -282,7 +282,7 @@ class ValueArray9 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray9& other); + void operator=(const ValueArray9& other) = delete; const T1 v1_; const T2 v2_; @@ -314,7 +314,7 @@ class ValueArray10 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray10& other); + void operator=(const ValueArray10& other) = delete; const T1 v1_; const T2 v2_; @@ -348,7 +348,7 @@ class ValueArray11 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray11& other); + void operator=(const ValueArray11& other) = delete; const T1 v1_; const T2 v2_; @@ -384,7 +384,7 @@ class ValueArray12 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray12& other); + void operator=(const ValueArray12& other) = delete; const T1 v1_; const T2 v2_; @@ -422,7 +422,7 @@ class ValueArray13 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray13& other); + void operator=(const ValueArray13& other) = delete; const T1 v1_; const T2 v2_; @@ -461,7 +461,7 @@ class ValueArray14 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray14& other); + void operator=(const ValueArray14& other) = delete; const T1 v1_; const T2 v2_; @@ -502,7 +502,7 @@ class ValueArray15 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray15& other); + void operator=(const ValueArray15& other) = delete; const T1 v1_; const T2 v2_; @@ -546,7 +546,7 @@ class ValueArray16 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray16& other); + void operator=(const ValueArray16& other) = delete; const T1 v1_; const T2 v2_; @@ -591,7 +591,7 @@ class ValueArray17 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray17& other); + void operator=(const ValueArray17& other) = delete; const T1 v1_; const T2 v2_; @@ -638,7 +638,7 @@ class ValueArray18 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray18& other); + void operator=(const ValueArray18& other) = delete; const T1 v1_; const T2 v2_; @@ -686,7 +686,7 @@ class ValueArray19 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray19& other); + void operator=(const ValueArray19& other) = delete; const T1 v1_; const T2 v2_; @@ -736,7 +736,7 @@ class ValueArray20 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray20& other); + void operator=(const ValueArray20& other) = delete; const T1 v1_; const T2 v2_; @@ -789,7 +789,7 @@ class ValueArray21 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray21& other); + void operator=(const ValueArray21& other) = delete; const T1 v1_; const T2 v2_; @@ -843,7 +843,7 @@ class ValueArray22 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray22& other); + void operator=(const ValueArray22& other) = delete; const T1 v1_; const T2 v2_; @@ -899,7 +899,7 @@ class ValueArray23 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray23& other); + void operator=(const ValueArray23& other) = delete; const T1 v1_; const T2 v2_; @@ -957,7 +957,7 @@ class ValueArray24 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray24& other); + void operator=(const ValueArray24& other) = delete; const T1 v1_; const T2 v2_; @@ -1016,7 +1016,7 @@ class ValueArray25 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray25& other); + void operator=(const ValueArray25& other) = delete; const T1 v1_; const T2 v2_; @@ -1077,7 +1077,7 @@ class ValueArray26 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray26& other); + void operator=(const ValueArray26& other) = delete; const T1 v1_; const T2 v2_; @@ -1141,7 +1141,7 @@ class ValueArray27 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray27& other); + void operator=(const ValueArray27& other) = delete; const T1 v1_; const T2 v2_; @@ -1206,7 +1206,7 @@ class ValueArray28 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray28& other); + void operator=(const ValueArray28& other) = delete; const T1 v1_; const T2 v2_; @@ -1272,7 +1272,7 @@ class ValueArray29 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray29& other); + void operator=(const ValueArray29& other) = delete; const T1 v1_; const T2 v2_; @@ -1341,7 +1341,7 @@ class ValueArray30 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray30& other); + void operator=(const ValueArray30& other) = delete; const T1 v1_; const T2 v2_; @@ -1412,7 +1412,7 @@ class ValueArray31 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray31& other); + void operator=(const ValueArray31& other) = delete; const T1 v1_; const T2 v2_; @@ -1484,7 +1484,7 @@ class ValueArray32 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray32& other); + void operator=(const ValueArray32& other) = delete; const T1 v1_; const T2 v2_; @@ -1559,7 +1559,7 @@ class ValueArray33 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray33& other); + void operator=(const ValueArray33& other) = delete; const T1 v1_; const T2 v2_; @@ -1635,7 +1635,7 @@ class ValueArray34 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray34& other); + void operator=(const ValueArray34& other) = delete; const T1 v1_; const T2 v2_; @@ -1712,7 +1712,7 @@ class ValueArray35 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray35& other); + void operator=(const ValueArray35& other) = delete; const T1 v1_; const T2 v2_; @@ -1792,7 +1792,7 @@ class ValueArray36 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray36& other); + void operator=(const ValueArray36& other) = delete; const T1 v1_; const T2 v2_; @@ -1874,7 +1874,7 @@ class ValueArray37 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray37& other); + void operator=(const ValueArray37& other) = delete; const T1 v1_; const T2 v2_; @@ -1957,7 +1957,7 @@ class ValueArray38 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray38& other); + void operator=(const ValueArray38& other) = delete; const T1 v1_; const T2 v2_; @@ -2042,7 +2042,7 @@ class ValueArray39 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray39& other); + void operator=(const ValueArray39& other) = delete; const T1 v1_; const T2 v2_; @@ -2129,7 +2129,7 @@ class ValueArray40 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray40& other); + void operator=(const ValueArray40& other) = delete; const T1 v1_; const T2 v2_; @@ -2218,7 +2218,7 @@ class ValueArray41 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray41& other); + void operator=(const ValueArray41& other) = delete; const T1 v1_; const T2 v2_; @@ -2309,7 +2309,7 @@ class ValueArray42 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray42& other); + void operator=(const ValueArray42& other) = delete; const T1 v1_; const T2 v2_; @@ -2401,7 +2401,7 @@ class ValueArray43 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray43& other); + void operator=(const ValueArray43& other) = delete; const T1 v1_; const T2 v2_; @@ -2495,7 +2495,7 @@ class ValueArray44 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray44& other); + void operator=(const ValueArray44& other) = delete; const T1 v1_; const T2 v2_; @@ -2591,7 +2591,7 @@ class ValueArray45 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray45& other); + void operator=(const ValueArray45& other) = delete; const T1 v1_; const T2 v2_; @@ -2689,7 +2689,7 @@ class ValueArray46 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray46& other); + void operator=(const ValueArray46& other) = delete; const T1 v1_; const T2 v2_; @@ -2789,7 +2789,7 @@ class ValueArray47 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray47& other); + void operator=(const ValueArray47& other) = delete; const T1 v1_; const T2 v2_; @@ -2891,7 +2891,7 @@ class ValueArray48 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray48& other); + void operator=(const ValueArray48& other) = delete; const T1 v1_; const T2 v2_; @@ -2994,7 +2994,7 @@ class ValueArray49 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray49& other); + void operator=(const ValueArray49& other) = delete; const T1 v1_; const T2 v2_; @@ -3098,7 +3098,7 @@ class ValueArray50 { private: // No implementation - assignment is unsupported. - void operator=(const ValueArray50& other); + void operator=(const ValueArray50& other) = delete; const T1 v1_; const T2 v2_; @@ -3251,7 +3251,7 @@ class CartesianProductGenerator2 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -3266,7 +3266,7 @@ class CartesianProductGenerator2 }; // class CartesianProductGenerator2::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator2& other); + void operator=(const CartesianProductGenerator2& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -3379,7 +3379,7 @@ class CartesianProductGenerator3 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -3397,7 +3397,7 @@ class CartesianProductGenerator3 }; // class CartesianProductGenerator3::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator3& other); + void operator=(const CartesianProductGenerator3& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -3526,7 +3526,7 @@ class CartesianProductGenerator4 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -3547,7 +3547,7 @@ class CartesianProductGenerator4 }; // class CartesianProductGenerator4::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator4& other); + void operator=(const CartesianProductGenerator4& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -3689,7 +3689,7 @@ class CartesianProductGenerator5 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -3713,7 +3713,7 @@ class CartesianProductGenerator5 }; // class CartesianProductGenerator5::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator5& other); + void operator=(const CartesianProductGenerator5& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -3871,7 +3871,7 @@ class CartesianProductGenerator6 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -3898,7 +3898,7 @@ class CartesianProductGenerator6 }; // class CartesianProductGenerator6::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator6& other); + void operator=(const CartesianProductGenerator6& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -4070,7 +4070,7 @@ class CartesianProductGenerator7 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -4100,7 +4100,7 @@ class CartesianProductGenerator7 }; // class CartesianProductGenerator7::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator7& other); + void operator=(const CartesianProductGenerator7& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -4288,7 +4288,7 @@ class CartesianProductGenerator8 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -4321,7 +4321,7 @@ class CartesianProductGenerator8 }; // class CartesianProductGenerator8::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator8& other); + void operator=(const CartesianProductGenerator8& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -4523,7 +4523,7 @@ class CartesianProductGenerator9 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -4559,7 +4559,7 @@ class CartesianProductGenerator9 }; // class CartesianProductGenerator9::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator9& other); + void operator=(const CartesianProductGenerator9& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -4775,7 +4775,7 @@ class CartesianProductGenerator10 } // No implementation - assignment is unsupported. - void operator=(const Iterator& other); + void operator=(const Iterator& other) = delete; const ParamGeneratorInterface<ParamType>* const base_; // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. @@ -4814,7 +4814,7 @@ class CartesianProductGenerator10 }; // class CartesianProductGenerator10::Iterator // No implementation - assignment is unsupported. - void operator=(const CartesianProductGenerator10& other); + void operator=(const CartesianProductGenerator10& other) = delete; const ParamGenerator<T1> g1_; const ParamGenerator<T2> g2_; @@ -4850,7 +4850,7 @@ CartesianProductHolder2(const Generator1& g1, const Generator2& g2) private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder2& other); + void operator=(const CartesianProductHolder2& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -4873,7 +4873,7 @@ CartesianProductHolder3(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder3& other); + void operator=(const CartesianProductHolder3& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -4899,7 +4899,7 @@ CartesianProductHolder4(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder4& other); + void operator=(const CartesianProductHolder4& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -4927,7 +4927,7 @@ CartesianProductHolder5(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder5& other); + void operator=(const CartesianProductHolder5& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -4959,7 +4959,7 @@ CartesianProductHolder6(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder6& other); + void operator=(const CartesianProductHolder6& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -4994,7 +4994,7 @@ CartesianProductHolder7(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder7& other); + void operator=(const CartesianProductHolder7& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -5033,7 +5033,7 @@ CartesianProductHolder8(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder8& other); + void operator=(const CartesianProductHolder8& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -5076,7 +5076,7 @@ CartesianProductHolder9(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder9& other); + void operator=(const CartesianProductHolder9& other) = delete; const Generator1 g1_; const Generator2 g2_; @@ -5122,7 +5122,7 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, private: // No implementation - assignment is unsupported. - void operator=(const CartesianProductHolder10& other); + void operator=(const CartesianProductHolder10& other) = delete; const Generator1 g1_; const Generator2 g2_; diff --git a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h index d36e8203bcc..86e75a32ef4 100644 --- a/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h +++ b/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h @@ -870,12 +870,12 @@ using ::std::tuple_size; // A macro to disallow operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_ASSIGN_(type)\ - void operator=(type const &) + void operator=(type const &) = delete // A macro to disallow copy constructor and operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\ - type(type const &);\ + type(type const &) = delete;\ GTEST_DISALLOW_ASSIGN_(type) // Tell the compiler to warn about unused return values for functions declared |