mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Omit needless words] "No" conflicts after "With".
This commit is contained in:
@@ -818,9 +818,11 @@ static bool wordConflictsBeforePreposition(StringRef word,
|
||||
/// splitting.
|
||||
static bool wordConflictsAfterPreposition(StringRef word,
|
||||
StringRef preposition) {
|
||||
if (camel_case::sameWordIgnoreFirstCase(word, "error") &&
|
||||
camel_case::sameWordIgnoreFirstCase(preposition, "with"))
|
||||
return true;
|
||||
if (camel_case::sameWordIgnoreFirstCase(preposition, "with")) {
|
||||
if (camel_case::sameWordIgnoreFirstCase(word, "error") ||
|
||||
camel_case::sameWordIgnoreFirstCase(word, "no"))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (camel_case::sameWordIgnoreFirstCase(word, "visible") &&
|
||||
camel_case::sameWordIgnoreFirstCase(preposition, "to"))
|
||||
|
||||
Reference in New Issue
Block a user