We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f84d231 commit 8f37668Copy full SHA for 8f37668
clang/lib/AST/ByteCode/Disasm.cpp
@@ -44,7 +44,20 @@ inline static std::string printArg(Program &P, CodePtr &OpPC) {
44
std::string Result;
45
llvm::raw_string_ostream SS(Result);
46
auto Arg = OpPC.read<T>();
47
- SS << Arg;
+ // Make sure we print the integral value of chars.
48
+ if constexpr (std::is_integral_v<T>) {
49
+ if constexpr (sizeof(T) == 1) {
50
+ if constexpr (std::is_signed_v<T>)
51
+ SS << static_cast<int32_t>(Arg);
52
+ else
53
+ SS << static_cast<uint32_t>(Arg);
54
+ } else {
55
+ SS << Arg;
56
+ }
57
58
59
60
+
61
return Result;
62
}
63
0 commit comments