[Omit needless words] "No" conflicts after "With".

This commit is contained in:
Doug Gregor
2016-02-08 16:31:52 -08:00
parent 98a2f24a4f
commit 32b0c8c4a8
3 changed files with 7 additions and 3 deletions

View File

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