[Omit needless words] The preposition "of" binds to the word preceding it.

This commit is contained in:
Doug Gregor
2016-02-11 11:28:18 -08:00
parent a024fe0115
commit 643725f75a
3 changed files with 11 additions and 5 deletions

View File

@@ -830,10 +830,6 @@ static bool wordConflictsBeforePreposition(StringRef word,
camel_case::sameWordIgnoreFirstCase(word, "compatible"))
return true;
if (camel_case::sameWordIgnoreFirstCase(preposition, "of") &&
camel_case::sameWordIgnoreFirstCase(word, "kind"))
return true;
return false;
}
@@ -877,6 +873,10 @@ static bool shouldPlacePrepositionOnArgLabel(StringRef beforePreposition,
afterPreposition == "Z")
return false;
// The preposition "of" binds tightly to the left word.
if (camel_case::sameWordIgnoreFirstCase(preposition, "of"))
return false;
return true;
}