mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[frontend] Switch from a default case to OPT_UNKNOWN for catching unknown arguments.
The integrated frontend already doesn't handle certain arguments which it understands (such as, for the moment, '-c'), so only emit an error in the event of an unknown option, not just unhandled options. Swift SVN r11110
This commit is contained in:
@@ -123,7 +123,7 @@ bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
|
||||
addInputFilename(InputArg->getValue());
|
||||
break;
|
||||
|
||||
default:
|
||||
case OPT_UNKNOWN:
|
||||
HasUnknownArgument = true;
|
||||
Diags.diagnose(SourceLoc(), diag::error_unknown_arg,
|
||||
InputArg->getAsString(*ParsedArgs));
|
||||
|
||||
Reference in New Issue
Block a user