mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 17:13:16 +01:00
Tweak the name for the function that diagnoses when fuzzing external libraries (#5974)
The old function name caused some confusion during the review of #5338, sending this to see if it provides a less surprising function name and boolean result. Happy to try other names / approaches as well.
This commit is contained in:
@@ -10,12 +10,11 @@
|
||||
|
||||
namespace Carbon {
|
||||
|
||||
auto DriverSubcommand::DisableFuzzingExternalLibraries(DriverEnv& driver_env,
|
||||
llvm::StringRef name)
|
||||
-> bool {
|
||||
auto DriverSubcommand::TestAndDiagnoseIfFuzzingExternalLibraries(
|
||||
DriverEnv& driver_env, llvm::StringRef name) -> bool {
|
||||
// Only need to do anything when fuzzing.
|
||||
if (!driver_env.fuzzing) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
CARBON_DIAGNOSTIC(
|
||||
@@ -23,7 +22,7 @@ auto DriverSubcommand::DisableFuzzingExternalLibraries(DriverEnv& driver_env,
|
||||
"preventing fuzzing of `{0}` subcommand due to external library",
|
||||
std::string);
|
||||
driver_env.emitter.Emit(ToolFuzzingDisallowed, name.str());
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user