You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con
Eric Fiselier 8e030714ff [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function.
Summary:
This patch fixes __not_null's detection of nullptr by breaking it down into 4 cases.

1. `__not_null(Tp const&)`: Default case. Tp is not null.
2. `__not_null(Tp* __ptr);` Case for pointers to functions.
3. `__not_null(_Ret _Class::* __ptr);` Case for pointers to members.
4. `__not_null(function<Tp> const&);`: Cases for other std::functions.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11111

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@245335 91177308-0d34-0410-b5e6-96231b3b80d8
10 years ago
..
F.pass.cpp Cleanup tests that fail in C++1z and with Clang 3.8 10 years ago
F_assign.pass.cpp [libcxx] Fix PR 22468 - std::function<void()> does not accept non-void-returning functions 11 years ago
F_incomplete.pass.cpp Move test into test/std subdirectory. 11 years ago
F_nullptr.pass.cpp [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function. 10 years ago
alloc.pass.cpp [libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind. 11 years ago
alloc_F.pass.cpp Fix std::function allocator constructors in C++03. 11 years ago
alloc_function.pass.cpp Fix std::function allocator constructors in C++03. 11 years ago
alloc_nullptr.pass.cpp [libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind. 11 years ago
alloc_rfunction.pass.cpp [libc++] Fix PR22922 - Allocator support for std::function does not know how to rebind. 11 years ago
copy.pass.cpp [libcxx] Consolidate new/delete replacement in tests and disable it when using sanitizers. 11 years ago
copy_assign.pass.cpp [libcxx] Consolidate new/delete replacement in tests and disable it when using sanitizers. 11 years ago
default.pass.cpp Move test into test/std subdirectory. 11 years ago
nullptr_t.pass.cpp Move test into test/std subdirectory. 11 years ago
nullptr_t_assign.pass.cpp [libcxx] Consolidate new/delete replacement in tests and disable it when using sanitizers. 11 years ago