diff options
Diffstat (limited to 'llvm/unittests/ADT')
-rw-r--r-- | llvm/unittests/ADT/OptionalTest.cpp | 10 | ||||
-rw-r--r-- | llvm/unittests/ADT/SmallVectorTest.cpp | 12 | ||||
-rw-r--r-- | llvm/unittests/ADT/StringMapTest.cpp | 8 |
3 files changed, 15 insertions, 15 deletions
diff --git a/llvm/unittests/ADT/OptionalTest.cpp b/llvm/unittests/ADT/OptionalTest.cpp index cadadced139..92c4eec487a 100644 --- a/llvm/unittests/ADT/OptionalTest.cpp +++ b/llvm/unittests/ADT/OptionalTest.cpp @@ -183,10 +183,10 @@ struct MultiArgConstructor { explicit MultiArgConstructor(int x, bool positive) : x(x), y(positive ? x : -x) {} - MultiArgConstructor(const MultiArgConstructor &) LLVM_DELETED_FUNCTION; - MultiArgConstructor(MultiArgConstructor &&) LLVM_DELETED_FUNCTION; - MultiArgConstructor &operator=(const MultiArgConstructor &) LLVM_DELETED_FUNCTION; - MultiArgConstructor &operator=(MultiArgConstructor &&) LLVM_DELETED_FUNCTION; + MultiArgConstructor(const MultiArgConstructor &) = delete; + MultiArgConstructor(MultiArgConstructor &&) = delete; + MultiArgConstructor &operator=(const MultiArgConstructor &) = delete; + MultiArgConstructor &operator=(MultiArgConstructor &&) = delete; static unsigned Destructions; ~MultiArgConstructor() { @@ -340,7 +340,7 @@ struct Immovable { } private: // This should disable all move/copy operations. - Immovable(Immovable&& other) LLVM_DELETED_FUNCTION; + Immovable(Immovable&& other) = delete; }; unsigned Immovable::Constructions = 0; diff --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp index 170a30bbac6..2bbb4ed8438 100644 --- a/llvm/unittests/ADT/SmallVectorTest.cpp +++ b/llvm/unittests/ADT/SmallVectorTest.cpp @@ -144,8 +144,8 @@ struct NonCopyable { NonCopyable(NonCopyable &&) {} NonCopyable &operator=(NonCopyable &&) { return *this; } private: - NonCopyable(const NonCopyable &) LLVM_DELETED_FUNCTION; - NonCopyable &operator=(const NonCopyable &) LLVM_DELETED_FUNCTION; + NonCopyable(const NonCopyable &) = delete; + NonCopyable &operator=(const NonCopyable &) = delete; }; LLVM_ATTRIBUTE_USED void CompileTest() { @@ -786,8 +786,8 @@ template <int I> struct EmplaceableArg { explicit EmplaceableArg(bool) : State(EAS_Arg) {} private: - EmplaceableArg &operator=(EmplaceableArg &&) LLVM_DELETED_FUNCTION; - EmplaceableArg &operator=(const EmplaceableArg &) LLVM_DELETED_FUNCTION; + EmplaceableArg &operator=(EmplaceableArg &&) = delete; + EmplaceableArg &operator=(const EmplaceableArg &) = delete; }; enum EmplaceableState { ES_Emplaced, ES_Moved }; @@ -827,8 +827,8 @@ struct Emplaceable { } private: - Emplaceable(const Emplaceable &) LLVM_DELETED_FUNCTION; - Emplaceable &operator=(const Emplaceable &) LLVM_DELETED_FUNCTION; + Emplaceable(const Emplaceable &) = delete; + Emplaceable &operator=(const Emplaceable &) = delete; }; TEST(SmallVectorTest, EmplaceBack) { diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp index 33d668fe2dd..4ed0b76f0f4 100644 --- a/llvm/unittests/ADT/StringMapTest.cpp +++ b/llvm/unittests/ADT/StringMapTest.cpp @@ -244,7 +244,7 @@ TEST_F(StringMapTest, InsertRehashingPairTest) { // Create a non-default constructable value struct StringMapTestStruct { StringMapTestStruct(int i) : i(i) {} - StringMapTestStruct() LLVM_DELETED_FUNCTION; + StringMapTestStruct() = delete; int i; }; @@ -258,7 +258,7 @@ TEST_F(StringMapTest, NonDefaultConstructable) { struct Immovable { Immovable() {} - Immovable(Immovable&&) LLVM_DELETED_FUNCTION; // will disable the other special members + Immovable(Immovable&&) = delete; // will disable the other special members }; struct MoveOnly { @@ -272,8 +272,8 @@ struct MoveOnly { } private: - MoveOnly(const MoveOnly &) LLVM_DELETED_FUNCTION; - MoveOnly &operator=(const MoveOnly &) LLVM_DELETED_FUNCTION; + MoveOnly(const MoveOnly &) = delete; + MoveOnly &operator=(const MoveOnly &) = delete; }; TEST_F(StringMapTest, MoveOnly) { |