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