Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Basic/StringExtras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ static StringRef omitNeedlessWords(StringRef name,
NameRole::Partial, allPropertyNames, scratch);
if (shortenedNameWord == newShortenedNameWord &&
shortenedNameWord.back() == 'e') {
shortenedNameWord.drop_back();
shortenedNameWord = shortenedNameWord.drop_back();
newShortenedNameWord =
omitNeedlessWords(shortenedNameWord, typeName.CollectionElement,
NameRole::Partial, allPropertyNames, scratch);
Expand Down
4 changes: 4 additions & 0 deletions test/IDE/Inputs/custom-modules/OmitNeedlessWords.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
@interface SEGreebieArray : NSObject
@end

@interface Echo : NSObject
@end

typedef NS_OPTIONS(NSUInteger, OMWWobbleOptions) {
OMWWobbleSideToSide = 0x01,
OMWWobbleBackAndForth = 0x02,
Expand All @@ -21,6 +24,7 @@ typedef NS_OPTIONS(NSUInteger, OMWWobbleOptions) {
-(void)jumpToTop:(nonnull id)sender;
-(void)removeWithNoRemorse:(nonnull id)object;
-(void)bookmarkWithURLs:(nonnull NSArray<NSURL *> *)urls;
-(void)listenToEchoes:(nonnull NSArray<Echo *> *)echoes;
-(void)saveToURL:(nonnull NSURL *)url forSaveOperation:(NSInteger)operation;
-(void)indexWithItemNamed:(nonnull NSString *)name;
-(void)methodAndReturnError:(NSError **)error;
Expand Down
1 change: 1 addition & 0 deletions test/IDE/print_omit_needless_words.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
// CHECK-OMIT-NEEDLESS-WORDS: func jumpToTop(_: Any)
// CHECK-OMIT-NEEDLESS-WORDS: func removeWithNoRemorse(_: Any)
// CHECK-OMIT-NEEDLESS-WORDS: func bookmark(with: [NSURL])
// CHECK-OMIT-NEEDLESS-WORDS: func listen(to: [Echo])
// CHECK-OMIT-NEEDLESS-WORDS: func save(to: NSURL, forSaveOperation: Int)
// CHECK-OMIT-NEEDLESS-WORDS: func index(withItemNamed: String)
// CHECK-OMIT-NEEDLESS-WORDS: func methodAndReturnError(_: AutoreleasingUnsafeMutablePointer<NSError?>!)
Expand Down