forked from OSchip/llvm-project
Inject unique_ptr/shared_ptr into the test instead of using <memory>
Summary: Inject unique_ptr/shared_ptr into the test instead of using <memory> Libraries might not be present on tests. This fixes the break introduces at rL205854. Reviewers: klimek CC: cfe-commits Differential Revision: http://reviews.llvm.org/D3330 llvm-svn: 205913
This commit is contained in:
parent
5b031ebc70
commit
fec969a0af
|
@ -1,6 +1,22 @@
|
|||
// RUN: $(dirname %s)/check_clang_tidy_fix.sh %s misc-redundant-smartptr-get %t
|
||||
|
||||
#include <memory>
|
||||
namespace std {
|
||||
|
||||
template <typename T>
|
||||
class unique_ptr {
|
||||
T& operator*() const;
|
||||
T* operator->() const;
|
||||
T* get() const;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class shared_ptr {
|
||||
T& operator*() const;
|
||||
T* operator->() const;
|
||||
T* get() const;
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
struct Bar {
|
||||
void Do();
|
||||
|
|
|
@ -2,7 +2,23 @@
|
|||
|
||||
// CHECK-NOT: warning
|
||||
|
||||
#include <memory>
|
||||
namespace std {
|
||||
|
||||
template <typename T>
|
||||
class unique_ptr {
|
||||
T& operator*() const;
|
||||
T* operator->() const;
|
||||
T* get() const;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class shared_ptr {
|
||||
T& operator*() const;
|
||||
T* operator->() const;
|
||||
T* get() const;
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
struct int_ptr {
|
||||
int* get();
|
||||
|
|
Loading…
Reference in New Issue