r245731 - [SemaObjC] Remove unused code from test.
Alex Denisov via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 21 13:28:16 PDT 2015
Author: alexdenisov
Date: Fri Aug 21 15:28:16 2015
New Revision: 245731
URL: http://llvm.org/viewvc/llvm-project?rev=245731&view=rev
Log:
[SemaObjC] Remove unused code from test.
Patch by modocache (Brian Gesiak).
Modified:
cfe/trunk/test/SemaObjC/access-property-getter.m
Modified: cfe/trunk/test/SemaObjC/access-property-getter.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/access-property-getter.m?rev=245731&r1=245730&r2=245731&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/access-property-getter.m (original)
+++ cfe/trunk/test/SemaObjC/access-property-getter.m Fri Aug 21 15:28:16 2015
@@ -1,53 +1,17 @@
// RUN: %clang_cc1 -verify %s
- at protocol NSObject
-- (oneway void)release;
+ at protocol Protocol
+- (oneway void) method;
@end
- at protocol XCOutputStreams <NSObject>
- at end
-
-
- at interface XCWorkQueueCommandInvocation
-{
- id <XCOutputStreams> _outputStream;
-}
- at end
-
- at interface XCWorkQueueCommandSubprocessInvocation : XCWorkQueueCommandInvocation
- at end
-
- at interface XCWorkQueueCommandLocalSubprocessInvocation : XCWorkQueueCommandSubprocessInvocation
- at end
-
- at interface XCWorkQueueCommandDistributedSubprocessInvocation : XCWorkQueueCommandSubprocessInvocation
- at end
-
- at interface XCWorkQueueCommandCacheFetchInvocation : XCWorkQueueCommandSubprocessInvocation
-
- at end
-
- at 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<Protocol> object) {
+ object.method; // expected-warning {{property access result unused - getters should not be used for side effects}}
}
- at end
// rdar://19137815
#pragma clang diagnostic ignored "-Wunused-getter-return-value"
- at interface NSObject @end
-
- at interface I : NSObject
- at property (copy) id window;
- at end
-
- at implementation I
-- (void) Meth {
- [self window];
- self.window;
+void accessMethodViaPropertySyntaxWhenWarningIsIgnoredDoesNotTriggerWarning(id<Protocol> object) {
+ object.method;
}
- at end
More information about the cfe-commits
mailing list