mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 18:51:11 +01:00
Update LLVM and fix formatv issues. (#4282)
https://github.com/llvm/llvm-project/pull/105745 increased validation of formatv requirements, this fixes a couple issues. Note the CommandLine case was untested, and caught separately.
This commit is contained in:
@@ -927,9 +927,13 @@ auto Parser::ParseArg(const Arg& arg, bool short_spelling,
|
||||
return ParseFlag(arg, value);
|
||||
}
|
||||
|
||||
auto name =
|
||||
llvm::formatv(short_spelling ? "'-{0}' (short for '--{1}')" : "'--{1}'",
|
||||
arg.info.short_name, arg.info.name);
|
||||
std::string name;
|
||||
if (short_spelling) {
|
||||
name = llvm::formatv("'-{0}' (short for '--{1}')", arg.info.short_name,
|
||||
arg.info.name);
|
||||
} else {
|
||||
name = llvm::formatv("'--{0}'", arg.info.name);
|
||||
}
|
||||
|
||||
if (!value) {
|
||||
// We can't have a positional argument without a value, so we know this is
|
||||
|
||||
Reference in New Issue
Block a user