mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add an opt-in warning to complain about needless words in declarations.
The new option -Womit-needless-words finds places where names are redundant with type information, producing warnings and Fix-Its to shorten the names. Part of rdar://problem/22232287, to help bring the same heuristics we're applying in the Clang importer to the user's Swift code. Swift SVN r31234
This commit is contained in:
@@ -669,6 +669,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
if (Opts.DebuggerSupport)
|
||||
Opts.EnableDollarIdentifiers = true;
|
||||
Opts.Playground |= Args.hasArg(OPT_playground);
|
||||
Opts.WarnOmitNeedlessWords = Args.hasArg(OPT_warn_omit_needless_words);
|
||||
|
||||
Opts.EnableThrowWithoutTry |= Args.hasArg(OPT_enable_throw_without_try);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user