diff options
author | dim <dim@FreeBSD.org> | 2015-02-14 12:18:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-02-14 12:18:48 +0000 |
commit | ff28d95d1f024411955913aaa68c17f2b09c46fd (patch) | |
tree | dfd4e4f0fa9ce6e010e098662d5f00a37c9ff0e3 /test/PCH/implicitly-deleted.cpp | |
parent | cf8e1ca250cdf4ade1e7d628e56040eb27797b5d (diff) | |
download | FreeBSD-src-ff28d95d1f024411955913aaa68c17f2b09c46fd.zip FreeBSD-src-ff28d95d1f024411955913aaa68c17f2b09c46fd.tar.gz |
Vendor import of clang RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc3@229040
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 0000000..5238fd3 --- /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>(); +} |