diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp b/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp index 4dfaed2105d..551f38d7dfd 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp @@ -1,32 +1,8 @@ -// RUN: %check_clang_tidy %s modernize-make-unique %t +// RUN: %check_clang_tidy %s modernize-make-unique %t -- -- -std=c++11 \ +// RUN: -I%S/Inputs/modernize-smart-ptr -namespace std { - -template <typename T> -class default_delete {}; - -template <typename type, typename Deleter = std::default_delete<type>> -class unique_ptr { -public: - unique_ptr(); - unique_ptr(type *ptr); - unique_ptr(const unique_ptr<type> &t) = delete; - unique_ptr(unique_ptr<type> &&t); - ~unique_ptr(); - type &operator*() { return *ptr; } - type *operator->() { return ptr; } - type *release(); - void reset(); - void reset(type *pt); - void reset(type pt); - unique_ptr &operator=(unique_ptr &&); - template <typename T> - unique_ptr &operator=(unique_ptr<T> &&); - -private: - type *ptr; -}; -} +#include "unique_ptr.h" +// CHECK-FIXES: #include <memory> struct Base { Base(); |