Omit needless words: don't drop the first parameter name for failability initializers.

Swift SVN r31431
This commit is contained in:
Doug Gregor
2015-08-24 18:26:27 +00:00
parent d41e3b358a
commit 8ac10845b6
6 changed files with 25 additions and 9 deletions

View File

@@ -291,13 +291,16 @@ StringRef omitNeedlessWords(StringRef name, StringRef typeName, NameRole role);
/// \param returnsSelf Whether the result of the function is 'Self'
/// (in Swift) or 'instancetype' (in Objective-C).
///
/// \param failableInitializer Whether the result is a failable initializer.
///
/// \returns true if any words were omitted, false otherwise.
bool omitNeedlessWords(StringRef &baseName,
MutableArrayRef<StringRef> argNames,
StringRef resultType,
StringRef contextType,
ArrayRef<StringRef> paramTypes,
bool returnsSelf);
bool returnsSelf,
bool failableInitializer);
}
#endif // LLVM_SWIFT_BASIC_STRINGEXTRAS_HPP