Skip to content

Revert "[omit-needless-words] Fix a bug found by -Wunused-result" #4780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2016
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 = shortenedNameWord.drop_back();
shortenedNameWord.drop_back();
newShortenedNameWord =
omitNeedlessWords(shortenedNameWord, typeName.CollectionElement,
NameRole::Partial, allPropertyNames, scratch);
Expand Down
4 changes: 0 additions & 4 deletions test/IDE/Inputs/custom-modules/OmitNeedlessWords.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
@interface SEGreebieArray : NSObject
@end

@interface Echo : NSObject
@end

typedef NS_OPTIONS(NSUInteger, OMWWobbleOptions) {
OMWWobbleSideToSide = 0x01,
OMWWobbleBackAndForth = 0x02,
Expand All @@ -24,7 +21,6 @@ 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: 0 additions & 1 deletion test/IDE/print_omit_needless_words.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
// 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