llvm-project/libcxxabi
Tomasz Miąsko 1cea7ab4ba [demangler] Use standard semantics for StringView::substr
The StringView::substr now accepts a substring starting position and its
length instead of previous non-standard `from` & `to` positions.

All uses of two argument StringView::substr are in MicrosoftDemangler
and have 0 as a starting position, so no changes are necessary.

This also fixes a bug where attempting to extract a suffix with substr
(a `to` position equal to size) would return a substring without the
last character.

Fixing the issue should not introduce observable changes in the
demangler, since as currently used, a second argument to
StringView::substr is either: 1) a result of a successful call to
StringView::find and so necessarily smaller than size., or 2) in the
case of Demangler::demangleCharLiteral potentially equal to size, but
with demangler expecting more data to follow later on and failing either
way.

Reviewed By: #libc_abi, ldionne, erik.pilkington

Differential Revision: https://reviews.llvm.org/D100246
2021-04-25 13:56:41 +02:00
..
cmake [SystemZ][ZOS] Prefer -nostdlib++ as opposed to -nodefaultlibs when building c++ libraries 2021-02-16 18:42:14 +00:00
fuzz
include [libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers 2020-10-22 09:00:57 +03:00
lib [libc++/abi] Revert "[libc++] Move the weak symbols list to libc++abi" 2020-10-05 11:42:13 -04:00
src [demangler] Use standard semantics for StringView::substr 2021-04-25 13:56:41 +02:00
test [libc++abi] Adjust XFAIL for misaligned exception header on ARM 2021-04-07 16:14:50 -04:00
www [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
.clang-format
.gitignore
CMakeLists.txt [libcxx] Stop using use c++ subdirectory for libc++ library 2021-04-21 15:39:03 -07:00
CREDITS.TXT Try again, this time with the correct address 2017-12-29 19:26:28 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00