[Omit needless words] Stop moving "of" onto the base name.

The benefits from moving "of" onto the base name were outweighed by
the complications to the API guidelines.
This commit is contained in:
Doug Gregor
2016-02-23 10:24:03 -08:00
parent 5cb7768930
commit 5290a381b4
2 changed files with 4 additions and 19 deletions

View File

@@ -895,18 +895,6 @@ static bool shouldPlacePrepositionOnArgLabel(StringRef beforePreposition,
afterPreposition == "Z")
return false;
// The preposition "of" binds tightly to the left word, except in
// rare cases.
if (camel_case::sameWordIgnoreFirstCase(preposition, "of")) {
auto following = camel_case::getFirstWord(afterPreposition);
if (!camel_case::sameWordIgnoreFirstCase(following, "type") &&
!camel_case::sameWordIgnoreFirstCase(following, "types") &&
!camel_case::sameWordIgnoreFirstCase(following, "kind") &&
!camel_case::sameWordIgnoreFirstCase(following, "size") &&
!camel_case::sameWordIgnoreFirstCase(following, "length"))
return false;
}
return true;
}