llvm-project/libcxx
Richard Smith 5fd17ab1b0 Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from
<string.h> and wcschr, wcspbrk, wcsrchr, wmemchr, and wcsstr from <wchar.h> to
provide a const-correct overload set even when the underlying C library does
not.

This change adds a new macro, _LIBCPP_PREFERRED_OVERLOAD, which (if defined)
specifies that a given overload is a better match than an otherwise equally
good function declaration without the overload. This is implemented in modern
versions of Clang via __attribute__((enable_if)), and not elsewhere.

We use this new macro to define overloads in the global namespace for these
functions that displace the overloads provided by the C library, unless we
believe the C library is already providing the correct signatures.

llvm-svn: 260337
2016-02-10 00:59:02 +00:00
..
cmake Revert "Introduce a cmake module to figure out whether we need to link with libatomic." 2016-02-09 23:38:28 +00:00
docs [docs] Remove references to autoconf build. 2016-01-30 01:11:42 +00:00
include Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
lib Revert "Introduce a cmake module to figure out whether we need to link with libatomic." 2016-02-09 23:38:28 +00:00
src [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting 2016-01-29 13:53:23 +00:00
test Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
utils Add more missing license headers 2016-01-19 21:58:49 +00:00
www Implement LWG#2385; remove the allocator-aware std::function::assign call. It was useless, and didn't actually *do anything* with the allocator. Now it's gone. On the off chance that someone is mistakenly calling it, it's only gone in C++1z 2016-01-25 17:29:55 +00:00
.arcconfig Update Arcanist config to point to reviews.llvm.org 2014-06-10 18:29:36 +00:00
.gitignore [libc++] Refactor test components into modules. 2015-01-09 18:03:29 +00:00
CMakeLists.txt build: silence warnings in in-tree build 2016-02-08 03:50:18 +00:00
CREDITS.TXT Add self to CREDITS.txt 2015-02-26 00:48:22 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 20:13:11 +00:00
TODO.TXT Test commit to see if libcxx.llvm.org/docs builds 2015-09-04 22:57:00 +00:00