[lldb] Make char[N] formatters respect the end of the array (PR44649)

I believe this is a more natural behavior, and it also matches what gdb
does.

Differential Revision: https://reviews.llvm.org/D111399
This commit is contained in:
Pavel Labath
2021-10-08 13:14:33 +02:00
parent 36195d7d80
commit 8093c2ea57
2 changed files with 20 additions and 6 deletions

View File

@@ -722,7 +722,7 @@ void FormatManager::LoadSystemFormatters() {
new StringSummaryFormat(string_flags, "${var%s}"));
lldb::TypeSummaryImplSP string_array_format(
new StringSummaryFormat(string_array_flags, "${var%s}"));
new StringSummaryFormat(string_array_flags, "${var%char[]}"));
RegularExpression any_size_char_arr(llvm::StringRef("char \\[[0-9]+\\]"));