Files
clang-p2996/lldb/test/API/functionalities/data-formatter/builtin-formats/main.cpp
Walter Erquinigo ed0a14144b [LLDB] Fix type formatting empty c-strings (#68924)
The type formatter code is effectively considering empty strings as read
errors, which is wrong. The fix is very simple. We should rely on the
error object and stop checking the size. I also added a test.
2023-10-13 14:14:23 -04:00

11 lines
224 B
C++

#include <cstdint>
const char cstring[15] = " \033\a\b\f\n\r\t\vaA09\0";
const char *empty_cstring = "";
int main() {
int use = *cstring;
void *void_empty_cstring = (void *)empty_cstring;
return use; // break here
}