Files
clang-p2996/lldb/test/API/commands/expression/char/main.cpp
Arthur Eubanks ba8ded6820 [lldb] Don't check environment default char signedness when creating clang type for "char"
With -f(un)signed-char, the die corresponding to "char" may be the opposite DW_ATE_(un)signed_char from the default platform signedness.
Ultimately we should determine whether a type is the unspecified signedness char by looking if its name is "char" (as opposed to "signed char"/"unsigned char") and not care about DW_ATE_(un)signed_char matching the platform default.

Fixes #23443

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D136011
2022-10-20 15:03:36 -07:00

18 lines
333 B
C++

#include <stdio.h>
char g = 0;
signed char gs = 0;
unsigned char gu = 0;
int foo(char c) { return 1; }
int foo(signed char c) { return 2; }
int foo(unsigned char c) { return 3; }
int main() {
char c = 0;
signed char sc = 0;
unsigned char uc = 0;
printf("%d %d %d\n", foo(c), foo(sc), foo(uc));
return 0; // Break here
}