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-Perkins
2025-01-14 00:44:41 +00:00
committed by GitHub
co-authored by Richard Smith
parent 2faff26f92
commit a3e66d6116
2 changed files with 6 additions and 1 deletions
+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);