[SemaObjC] Remove unused code from test.
Patch by modocache (Brian Gesiak). llvm-svn: 245731
This commit is contained in:
parent
51973e1088
commit
6ea895b557
|
@ -1,53 +1,17 @@
|
|||
// RUN: %clang_cc1 -verify %s
|
||||
|
||||
@protocol NSObject
|
||||
- (oneway void)release;
|
||||
@protocol Protocol
|
||||
- (oneway void) method;
|
||||
@end
|
||||
|
||||
@protocol XCOutputStreams <NSObject>
|
||||
@end
|
||||
|
||||
|
||||
@interface XCWorkQueueCommandInvocation
|
||||
{
|
||||
id <XCOutputStreams> _outputStream;
|
||||
void accessMethodViaPropertySyntaxAndTriggerWarning(id<Protocol> object) {
|
||||
object.method; // expected-warning {{property access result unused - getters should not be used for side effects}}
|
||||
}
|
||||
@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;
|
||||
}
|
||||
@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<Protocol> object) {
|
||||
object.method;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in New Issue