llvm-project/libcxxabi/src
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
..
demangle [demangler] Use standard semantics for StringView::substr 2021-04-25 13:56:41 +02:00
include [libc++abi] Reuse libc++'s refstring.h header instead of copying it 2020-11-11 16:58:32 -05:00
CMakeLists.txt [CMake] Remove {LIBCXX,LIBCXXABI,LIBUNWIND}_INSTALL_PREFIX 2021-04-01 10:13:07 -07:00
abort_message.cpp [libc++abi] Fix build failure in abort_message.cpp when vasprintf isn't provided 2020-06-26 11:50:05 -04:00
abort_message.h [libc++abi] NFC: Simplify extern C declaration 2020-03-11 17:56:12 -04:00
cxa_aux_runtime.cpp [NFC] Correct outdated links to the Itanium C++ ABI documentation 2019-04-11 16:37:07 +00:00
cxa_default_handlers.cpp [libc++/abi] Replace uses of _NOEXCEPT in src/ by noexcept 2021-03-03 12:57:31 -05:00
cxa_demangle.cpp [demangle] NFC: get rid of NodeOrString 2019-11-04 12:17:12 -08:00
cxa_exception.cpp [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
cxa_exception.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
cxa_exception_storage.cpp [libcxx{,abi}] Emit deplibs only when detected by CMake 2019-12-02 22:19:20 +01:00
cxa_guard.cpp Rewrite cxa guard implementation. 2019-04-24 01:47:30 +00:00
cxa_guard_impl.h [libc++abi] Get rid of warnings when running the tests with GCC 2020-11-02 10:19:39 -05:00
cxa_handlers.cpp [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
cxa_handlers.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
cxa_noexception.cpp [NFC][libc++abi] Remove trailing whitespace from sources 2019-10-01 18:28:20 +00:00
cxa_personality.cpp [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
cxa_thread_atexit.cpp [libcxx{,abi}] Emit deplibs only when detected by CMake 2019-12-02 22:19:20 +01:00
cxa_vector.cpp [libc++abi] NFC: Remove pragma mark in favor of normal comment 2020-05-05 13:20:46 -04:00
cxa_virtual.cpp Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
fallback_malloc.cpp [libc++abi] Don't try calling __libcpp_aligned_free when aligned allocation is disabled 2020-12-01 17:45:14 -05:00
fallback_malloc.h [libc++abi] Remove uses of C++ headers when possible 2019-10-01 18:43:02 +00:00
private_typeinfo.cpp [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
private_typeinfo.h [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
stdlib_exception.cpp [libc++/abi] Replace uses of _NOEXCEPT in src/ by noexcept 2021-03-03 12:57:31 -05:00
stdlib_new_delete.cpp [libc++] NFC: Normalize `#endif //` comment indentation 2021-04-20 12:03:32 -04:00
stdlib_stdexcept.cpp [libc++/abi] Replace uses of _NOEXCEPT in src/ by noexcept 2021-03-03 12:57:31 -05:00
stdlib_typeinfo.cpp [libc++/abi] Replace uses of _NOEXCEPT in src/ by noexcept 2021-03-03 12:57:31 -05:00