llvm-project/libcxx
Eric Fiselier c0d5590a3b Fix bugs in filesystem detected by _LIBCPP_ASSERT.
Recently I turned on libc++'s debug mode assertions when
CMake is configured with -DLIBCXX_ENABLE_ASSERTIONS=ON. This
change exposed assertion failures caused by bugs in filesystem.
This patch fixes those failures.

The first bug was that `PathParser` was using front()/back()
on empty string views in order to get the address of the character.
However this is UB on empty strings. Those operations now use data()
to obtain the pointer.

The second bug was that directory_iterator attempted to capture errno when it
was unset and there was an assertion to detect this.

llvm-svn: 294360
2017-02-07 21:51:58 +00:00
..
benchmarks improve performance of string::find 2016-12-30 18:01:36 +00:00
cmake Improve CMake and LIT support for Windows 2017-01-16 20:47:35 +00:00
docs Fix typo in docs 2017-02-05 01:16:25 +00:00
include Refer to _LIBCPP_MSVC macro where applicable 2017-02-06 05:26:49 +00:00
lib Adjust Apple ABI list after r294133 2017-02-05 20:17:41 +00:00
src Fix bugs in filesystem detected by _LIBCPP_ASSERT. 2017-02-07 21:51:58 +00:00
test fix python3 syntax error 2017-02-07 21:21:17 +00:00
utils Allow sym_diff.py to report non-zero for non-breaking ABI changes 2017-01-18 00:05:01 +00:00
www Mark LWG2784 as ready 2017-02-07 15:34:20 +00:00
.arcconfig Upgrade arcconfig to use https 2016-07-18 02:02:49 +00:00
.clang-format Tweak .clang-format configuration. 2017-01-14 05:43:02 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt Remove CMake hack 2017-02-05 01:19:02 +00:00
CREDITS.TXT Added "Michael Park" to `CREDITS.TXT`. 2017-01-07 10:19:24 +00:00
LICENSE.TXT Update year to 2017 2017-01-03 11:20:43 +00:00
NOTES.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00
TODO.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00