diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-02-14 12:18:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-02-14 12:18:48 +0000 |
commit | ec12bbe359799efc32df6bde5e872cb2713c0b19 (patch) | |
tree | dfd4e4f0fa9ce6e010e098662d5f00a37c9ff0e3 /test/PCH/implicitly-deleted.cpp | |
parent | 9e435806aaf5bd7e974d317ef247f200200ad686 (diff) |
Diffstat (limited to 'test/PCH/implicitly-deleted.cpp')
-rw-r--r-- | test/PCH/implicitly-deleted.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/PCH/implicitly-deleted.cpp b/test/PCH/implicitly-deleted.cpp new file mode 100644 index 0000000000000..5238fd3d93ce8 --- /dev/null +++ b/test/PCH/implicitly-deleted.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++11 -x c++-header %s -emit-pch -o %t.pch +// RUN: %clang_cc1 -std=c++11 -x c++ /dev/null -include-pch %t.pch +class move_only { move_only(const move_only&) = delete; move_only(move_only&&); }; +struct sb { + move_only il; + sb(); + sb(sb &&); +}; + +template<typename T> T make(); +template<typename T> void doit(decltype(T(make<const T&>()))*) { T(make<const T&>()); } +template<typename T> void doit(...) { T(make<T&&>()); } +template<typename T> void later() { doit<T>(0); } + +void fn1() { + sb x; + later<sb>(); +} |