Most of the cases were where a C++ file was being compiled with the C substitution. There were a few cases of the opposite though. LLDB seems to be the only real culprit in the LLVM codebase for these mismatches. Rest of the LLVM presumably sticks at least language-specific options in the common substitutions making the mistakes immediately apparent. I found these by using Clang frontend configuration files containing language-specific options for both C and C++ (e.g. `-std=c2y` and `-std=c++26`).
25 lines
1.3 KiB
Plaintext
25 lines
1.3 KiB
Plaintext
# UNSUPPORTED: system-windows
|
|
#
|
|
# RUN: %clangxx_host -g -O0 %S/Inputs/verbose_trap.cpp -o %t.out -DVERBOSE_TRAP_TEST_CATEGORY=\"Foo\" -DVERBOSE_TRAP_TEST_MESSAGE=\"Bar\"
|
|
# RUN: %lldb -b -s %s %t.out | FileCheck %s --check-prefixes=CHECK,CHECK-BOTH
|
|
#
|
|
# RUN: %clangxx_host -g -O0 %S/Inputs/verbose_trap.cpp -o %t.out -DVERBOSE_TRAP_TEST_CATEGORY=\"\" -DVERBOSE_TRAP_TEST_MESSAGE=\"Bar\"
|
|
# RUN: %lldb -b -s %s %t.out | FileCheck %s --check-prefixes=CHECK,CHECK-MESSAGE_ONLY
|
|
#
|
|
# RUN: %clangxx_host -g -O0 %S/Inputs/verbose_trap.cpp -o %t.out -DVERBOSE_TRAP_TEST_CATEGORY=\"Foo\" -DVERBOSE_TRAP_TEST_MESSAGE=\"\"
|
|
# RUN: %lldb -b -s %s %t.out | FileCheck %s --check-prefixes=CHECK,CHECK-CATEGORY_ONLY
|
|
#
|
|
# RUN: %clangxx_host -g -O0 %S/Inputs/verbose_trap.cpp -o %t.out -DVERBOSE_TRAP_TEST_CATEGORY=\"\" -DVERBOSE_TRAP_TEST_MESSAGE=\"\"
|
|
# RUN: %lldb -b -s %s %t.out | FileCheck %s --check-prefixes=CHECK,CHECK-NONE
|
|
|
|
run
|
|
# CHECK-BOTH: thread #{{.*}}stop reason = Foo: Bar
|
|
# CHECK-MESSAGE_ONLY: thread #{{.*}}stop reason = <empty category>: Bar
|
|
# CHECK-CATEGORY_ONLY: thread #{{.*}}stop reason = Foo
|
|
# CHECK-NONE: thread #{{.*}}stop reason = <empty category>
|
|
frame info
|
|
# CHECK: frame #{{.*}}`Dummy::func(this={{.*}}) at verbose_trap.cpp
|
|
frame recognizer info 0
|
|
# CHECK: frame 0 is recognized by Verbose Trap StackFrame Recognizer
|
|
q
|