2009-12-15 20:14:24 +00:00
|
|
|
// RUN: %clang_cc1 -verify %s
|
2009-03-19 18:15:34 +00:00
|
|
|
|
2015-08-21 20:28:16 +00:00
|
|
|
@protocol Protocol
|
|
|
|
- (oneway void) method;
|
2009-03-19 18:15:34 +00:00
|
|
|
@end
|
|
|
|
|
2015-08-21 20:28:16 +00:00
|
|
|
void accessMethodViaPropertySyntaxAndTriggerWarning(id<Protocol> object) {
|
|
|
|
object.method; // expected-warning {{property access result unused - getters should not be used for side effects}}
|
2009-03-19 18:15:34 +00:00
|
|
|
}
|
2014-12-18 00:30:54 +00:00
|
|
|
|
|
|
|
// rdar://19137815
|
|
|
|
#pragma clang diagnostic ignored "-Wunused-getter-return-value"
|
|
|
|
|
2015-08-21 20:28:16 +00:00
|
|
|
void accessMethodViaPropertySyntaxWhenWarningIsIgnoredDoesNotTriggerWarning(id<Protocol> object) {
|
|
|
|
object.method;
|
2014-12-18 00:30:54 +00:00
|
|
|
}
|
|
|
|
|