From: Alex Denisov <1101.debian@gmail.com> Date: Fri, 21 Aug 2015 20:28:16 +0000 (+0000) Subject: [SemaObjC] Remove unused code from test. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=971cad6850f37635ad0db0e25f07be94ad88edc5;p=clang [SemaObjC] Remove unused code from test. Patch by modocache (Brian Gesiak). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245731 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaObjC/access-property-getter.m b/test/SemaObjC/access-property-getter.m index 41827bb3c8..779274431d 100644 --- a/test/SemaObjC/access-property-getter.m +++ b/test/SemaObjC/access-property-getter.m @@ -1,53 +1,17 @@ // RUN: %clang_cc1 -verify %s -@protocol NSObject -- (oneway void)release; +@protocol Protocol +- (oneway void) method; @end -@protocol XCOutputStreams -@end - - -@interface XCWorkQueueCommandInvocation -{ - id _outputStream; -} -@end - -@interface XCWorkQueueCommandSubprocessInvocation : XCWorkQueueCommandInvocation -@end - -@interface XCWorkQueueCommandLocalSubprocessInvocation : XCWorkQueueCommandSubprocessInvocation -@end - -@interface XCWorkQueueCommandDistributedSubprocessInvocation : XCWorkQueueCommandSubprocessInvocation -@end - -@interface XCWorkQueueCommandCacheFetchInvocation : XCWorkQueueCommandSubprocessInvocation - -@end - -@implementation XCWorkQueueCommandCacheFetchInvocation -- (id)harvestPredictivelyProcessedOutputFiles -{ - _outputStream.release; // expected-warning {{property access result unused - getters should not be used for side effects}} - return 0; +void accessMethodViaPropertySyntaxAndTriggerWarning(id object) { + object.method; // expected-warning {{property access result unused - getters should not be used for side effects}} } -@end // rdar://19137815 #pragma clang diagnostic ignored "-Wunused-getter-return-value" -@interface NSObject @end - -@interface I : NSObject -@property (copy) id window; -@end - -@implementation I -- (void) Meth { - [self window]; - self.window; +void accessMethodViaPropertySyntaxWhenWarningIsIgnoredDoesNotTriggerWarning(id object) { + object.method; } -@end