forked from OSchip/llvm-project
c0d5590a3b
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 |
||
---|---|---|
.. | ||
benchmarks | ||
cmake | ||
docs | ||
include | ||
lib | ||
src | ||
test | ||
utils | ||
www | ||
.arcconfig | ||
.clang-format | ||
.gitignore | ||
CMakeLists.txt | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
NOTES.TXT | ||
TODO.TXT |