mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Omit needless words: Don't avoid keywords
We want to see the results of the omit-needless-words heuristics under the assumption that we won't need to quote these argument labels in the future, and it avoids some head-scratching to not have this heuristic in place. Swift SVN r31625
This commit is contained in:
@@ -364,8 +364,8 @@ StringRef swift::omitNeedlessWords(StringRef name, StringRef typeName,
|
||||
// point.
|
||||
StringRef newName = name.substr(0, nameWordRevIter.base().getPosition());
|
||||
|
||||
// If we ended up with a keyword or a name like "get" or "set", do nothing.
|
||||
if (isKeyword(newName) || newName == "get" || newName == "set")
|
||||
// If we ended up with a name like "get" or "set", do nothing.
|
||||
if (newName == "get" || newName == "set")
|
||||
return name;
|
||||
|
||||
// We're done.
|
||||
|
||||
Reference in New Issue
Block a user