teak-llvm/libcxx/test/std/utilities/function.objects
Eric Fiselier 0d28f78401 [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

llvm-svn: 245335
2015-08-18 19:41:51 +00:00
..
arithmetic.operations In C++03, a bunch of the arithmetic/logical/comparison functors (such as negate/bit_not.pass/logical_not) were defined as deriving from unary_funtion. That restriction was removed in C++11, but the tests still check for this. Change the test to look for the embedded types first_argument/second_argument/result_type. No change to the library, just more standards-compliant tests. Thanks to STL @ Microsoft for the suggestion. 2015-01-07 21:51:30 +00:00
bind Cleanup <__functional_03> 2015-07-22 04:14:38 +00:00
bitwise.operations Get tests running with warnings. Fix warnings in headers and tests 2015-02-05 20:28:37 +00:00
comparisons Missed one comparison test in r225375 2015-01-07 20:40:28 +00:00
func.def
func.invoke Remove non-ascii characters 2015-07-14 20:45:48 +00:00
func.memfn
func.require Checking more __invoke tests. 2015-07-28 01:25:36 +00:00
func.wrap [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function. 2015-08-18 19:41:51 +00:00
logical.operations In C++03, a bunch of the arithmetic/logical/comparison functors (such as negate/bit_not.pass/logical_not) were defined as deriving from unary_funtion. That restriction was removed in C++11, but the tests still check for this. Change the test to look for the embedded types first_argument/second_argument/result_type. No change to the library, just more standards-compliant tests. Thanks to STL @ Microsoft for the suggestion. 2015-01-07 21:51:30 +00:00
negators In C++03, a bunch of the arithmetic/logical/comparison functors (such as negate/bit_not.pass/logical_not) were defined as deriving from unary_funtion. That restriction was removed in C++11, but the tests still check for this. Change the test to look for the embedded types first_argument/second_argument/result_type. No change to the library, just more standards-compliant tests. Thanks to STL @ Microsoft for the suggestion. 2015-01-07 21:51:30 +00:00
refwrap
unord.hash Cleaning up the test suite; remove some includes of non-standard file <__config> 2015-01-18 19:05:51 +00:00
version.pass.cpp