[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:
Connor Wakamo
2013-12-11 01:29:18 +00:00
parent 42c61e2df1
commit 93fcbed8b6

View File

@@ -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));