Fix short option error (#4796)

"unsigned char" prints as an integer, not a char

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Jon Ross-PerkinsandRichard Smith authored and GitHub committed 2025-01-14 00:44:41 +00:00
1 parent 2faff26f92
commit a3e66d6116
2 files changed
+6 -1

No files matched your search

+2 -1
View File
@@ -1039,7 +1039,8 @@ auto Parser::ParseShortOptionSeq(llvm::StringRef unparsed_arg)
auto* arg_entry =
(c < short_option_table_.size()) ? short_option_table_[c] : nullptr;
if (!arg_entry) {
return Error(llvm::formatv("unknown short option `{0}`", c));
return Error(
llvm::formatv("unknown short option `-{0}`", static_cast<char>(c)));
}
// Mark this argument as parsed.
arg_entry->setInt(true);