From b7332b04df5d50c92640c74cfeb138ecb7e3f7ae Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 20 Aug 2019 18:01:01 +0000 Subject: Remove upstream files and directories from vendor/libc++/dist that we do not use. This saves on repository space, and reduces the number of tree conflicts when merging. --- .../func.wrap.func.con/F_incomplete.pass.cpp | 64 ---------------------- 1 file changed, 64 deletions(-) delete mode 100644 test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp (limited to 'test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp') diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp deleted file mode 100644 index 75e2ecac3c41..000000000000 --- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// - -// class function - -// template function(F); - -// Allow incomplete argument types in the __is_callable check - -#include -#include - -struct X{ - typedef std::function callback_type; - virtual ~X() {} -private: - callback_type _cb; -}; - -struct IncompleteReturnType { - std::function fn; -}; - - -int called = 0; -IncompleteReturnType test_fn() { - ++called; - IncompleteReturnType I; - return I; -} - -// See llvm.org/PR34298 -void test_pr34298() -{ - static_assert(std::is_copy_constructible::value, ""); - static_assert(std::is_copy_assignable::value, ""); - { - IncompleteReturnType X; - X.fn = test_fn; - const IncompleteReturnType& CX = X; - IncompleteReturnType X2 = CX; - assert(X2.fn); - assert(called == 0); - X2.fn(); - assert(called == 1); - } - { - IncompleteReturnType Empty; - IncompleteReturnType X2 = Empty; - assert(!X2.fn); - } -} - -int main() { - test_pr34298(); -} -- cgit v1.3