llvm-project/libcxx
Arthur O'Dwyer 3696227c10 [libc++] ADL-proof by adding _VSTD:: qualifications to memmove etc.
Generally these calls aren't vulnerable to ADL because they involve only
primitive types. The ones in <list> and <vector> drag in namespace std
but that's OK; the ones in <fstream> and <strstream> are vulnerable
iff `CharT` is an enum type, which seems far-fetched.
But absolutely zero of them *need* ADL to happen; so in my opinion
they should all be consistently qualified, just like calls to any
other (non-user-customizable) functions in namespace std.

Also: Include <cstring> and <cwchar> in <__string>.
We seemed to be getting lucky that <memory> included <iterator>
included <iosfwd> included <wchar.h>. That gave us the
global-namespace `wmemmove`, but not `_VSTD::wmemmove`.
This is now fixed.

I didn't touch these headers:
<ext/__hash> uses strlen, safely
<support/ibm/locale_mgmt_aix.h> uses memcpy, safely
<string.h> uses memchr and strchr, safely
<wchar.h> uses wcschr, safely
<__bsd_locale_fallbacks.h> uses wcsnrtombs, safely

Differential Revision: https://reviews.llvm.org/D93061
2020-12-10 22:03:12 -05:00
..
benchmarks [runtimes] Revert the libc++ __config_site change 2020-10-23 09:41:48 -04:00
cmake [libc++] Clarify how we pick the typeinfo comparison 2020-11-18 16:58:45 -05:00
docs [libc++] [P1164] [C++20] Make fs::create_directory() error if there is already a non-directory. 2020-12-10 08:40:27 +01:00
include [libc++] ADL-proof by adding _VSTD:: qualifications to memmove etc. 2020-12-10 22:03:12 -05:00
lib [libc++] [P0482] [C++20] Implement missing bits for codecvt and codecvt_byname. 2020-12-02 09:01:58 +01:00
src [libc++] [P1164] [C++20] Make fs::create_directory() error if there is already a non-directory. 2020-12-10 08:40:27 +01:00
test [libc++] [P1164] [C++20] Make fs::create_directory() error if there is already a non-directory. 2020-12-10 08:40:27 +01:00
utils [libc++] Add a script to automatize updating test for a new header. 2020-12-10 08:37:50 +01:00
www [libc++] [docs] Migrate C++ status pages to RestructuredText (RST). 2020-11-26 10:01:09 +01:00
.clang-format
.gitignore [libcxx] Fix .gitignore to not exclude test directories 2020-03-25 17:52:23 -07:00
CMakeLists.txt [libc++] [libc++abi] Use C++20 standard. 2020-11-22 15:57:25 +01:00
CREDITS.TXT [libcxx] Adds [concept.same] 2020-04-08 18:00:13 -04:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
TODO.TXT [libc++][NFC] Remove outdated TODO item 2020-07-08 13:04:33 -04:00
appveyor-reqs-install.cmd Attempt to upgrade compiler used by appveyor builds 2019-04-03 20:40:01 +00:00
appveyor.yml disable appveyor config for MSVC 2015 2019-04-03 20:36:51 +00:00