llvm-project/libcxxabi/test
Nathan Sidwell 28669bd091 [demangler] Improve ->* & .* demangling
The demangler treats ->* as a BinaryExpr, but .* as a MemberExpr.
That's inconsistent.  This makes the former a MemberExpr too.
However, in order to not regress the paren output, MemberExpr::print
is modified to parenthesize the MemberExpr if the operator ends with
'*'.  Printing is affected thusly:

Before:
    obj.member
    obj->member
    obj.*member
    (obj) ->* (member)

After:
   obj.member   # Unchanged
   obj->member  # Unchanged
   obj.*(member)  # Added paren member operand
   obj->*(member) # Removed paren on object operand, less whitespace

The right solution to the paren problem is to add some notion of
precedence (and associativity) to Nodes, but that's a larger change
that would become simpler once the refactoring I'm doing is completed.

FWIW, binutils' demangler's paren algorithm has a small idea of
precedence, and will generally not emit parens when the operand is
unary.

Reviewed By: bruno

Differential Revision: https://reviews.llvm.org/D118486
2022-02-08 06:28:26 -08:00
..
configs [libcxx] Use LIBCXX_EXECUTOR in new test configs 2021-12-22 00:43:28 +02:00
libcxxabi [libc++abi] Change LIBCXXABI_NO_TIMER to LIBCXXABI_USE_TIMER 2021-10-13 08:02:31 -04:00
native/arm-linux-eabi [libc++] Move handling of the target triple to the DSL 2021-05-08 11:10:53 -04:00
support [libc++abi] Change LIBCXXABI_NO_TIMER to LIBCXXABI_USE_TIMER 2021-10-13 08:02:31 -04:00
vendor [libc++abi][AIX] Add 2 LIT tests for the AIX unwinder 2021-12-09 16:43:32 -05:00
CMakeLists.txt [runtimes] Remove support for GCC-style 32 bit multilib builds 2021-12-01 12:57:01 -05:00
backtrace_test.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_array_01.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_array_02.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_class_01.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_class_02.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_class_03.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_class_04.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_const_pointer_nullptr.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_function_01.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_function_02.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_function_03.pass.cpp [libc++] [test] Eliminate libcpp-no-noexcept-function-type and libcpp-no-structured-bindings. 2021-11-20 11:44:57 -05:00
catch_in_noexcept.pass.cpp [runtimes] Use int main(int, char**) consistently in tests 2020-10-08 14:28:13 -04:00
catch_member_data_pointer_01.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_member_function_pointer_01.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_member_function_pointer_02.pass.cpp [libc++] [test] Eliminate libcpp-no-noexcept-function-type and libcpp-no-structured-bindings. 2021-11-20 11:44:57 -05:00
catch_member_pointer_nullptr.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_multi_level_pointer.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_pointer_nullptr.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_pointer_reference.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_ptr.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_ptr_02.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
catch_reference_nullptr.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
cxa_bad_cast.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
cxa_bad_typeid.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
cxa_thread_atexit_test.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
cxa_vec_new_overflow_PR41395.pass.cpp [runtimes] Simplify how we specify XFAIL & friends based on the triple 2021-07-01 14:03:30 -04:00
dynamic_cast.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
dynamic_cast3.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
dynamic_cast5.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
dynamic_cast14.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
dynamic_cast_stress.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
exception_object_alignment.2.pass.cpp [runtimes] Use int main(int, char**) consistently in tests 2020-10-08 14:28:13 -04:00
exception_object_alignment.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
forced_unwind1.pass.cpp [Unwind] Harmonise exception class for EHABI spec. 2021-09-02 11:31:03 +02:00
forced_unwind2.pass.cpp [Unwind] Harmonise exception class for EHABI spec. 2021-09-02 11:31:03 +02:00
forced_unwind3.pass.cpp [libunwind][ARM] Handle end of stack during unwind 2021-11-26 13:26:49 +01:00
guard_test_basic.pass.cpp [libcxxabi] Added convenience classes to cxa_guard 2022-01-12 17:31:36 -05:00
guard_threaded_test.pass.cpp [NFC][libcxxabi] Rename GlobalLock to GlobalMutex 2022-01-12 17:29:17 -05:00
incomplete_type.sh.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
inherited_exception.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
lit.cfg.py [libc++abi] Allow specifying custom Lit config files 2020-06-25 12:15:15 -04:00
lit.site.cfg.in [runtimes] Add tests for vendor-specific properties 2021-10-07 15:46:20 -04:00
noexception1.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
noexception2.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
noexception3.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
noexception4.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_aux_runtime.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_aux_runtime_op_array_new.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_demangle.pass.cpp [demangler] Improve ->* & .* demangling 2022-02-08 06:28:26 -08:00
test_exception_address_alignment.pass.cpp [libc++] Remove test-suite annotations for unsupported Clang versions 2021-08-20 15:05:13 -04:00
test_exception_storage.pass.cpp [runtimes] Remove support for GCC-style 32 bit multilib builds 2021-12-01 12:57:01 -05:00
test_fallback_malloc.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_guard.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_vector1.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_vector2.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
test_vector3.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
thread_local_destruction_order.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
uncaught_exception.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
uncaught_exceptions.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unittest_demangle.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unwind_01.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unwind_02.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unwind_03.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unwind_04.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unwind_05.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00
unwind_06.pass.cpp [runtimes][NFC] Remove filenames at the top of the license notice 2021-11-17 16:30:52 -05:00