llvm-project/clang/test/SemaObjC/access-property-getter.m

37 lines
863 B
Mathematica
Raw Normal View History

// RUN: %clang_cc1 -verify %s
@protocol NSObject
- (oneway void)release;
@end
@protocol XCOutputStreams <NSObject>
@end
@interface XCWorkQueueCommandInvocation
{
id <XCOutputStreams> _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}}
2009-07-22 08:43:08 +08:00
return 0;
}
@end