Skip to content

Commit e1e885e

Browse files
committed
omitNeedlessWords: delete accidentally dead code
StringRef::drop_back returns a new string instead of mutating the existing one, so this check would never actually make a difference. Drat.
1 parent 42f7a35 commit e1e885e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Diff for: lib/Basic/StringExtras.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -680,13 +680,6 @@ static Words::iterator matchTypeNameFromBackWithSpecialCases(
680680
auto newShortenedNameWord
681681
= omitNeedlessWords(shortenedNameWord, typeName.CollectionElement,
682682
NameRole::Partial, allPropertyNames);
683-
if (shortenedNameWord == newShortenedNameWord &&
684-
shortenedNameWord.back() == 'e') {
685-
(void)shortenedNameWord.drop_back();
686-
newShortenedNameWord =
687-
omitNeedlessWords(shortenedNameWord, typeName.CollectionElement,
688-
NameRole::Partial, allPropertyNames);
689-
}
690683

691684
if (shortenedNameWord != newShortenedNameWord) {
692685
unsigned targetSize = newShortenedNameWord.size();

0 commit comments

Comments
 (0)