You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
482 B
18 lines
482 B
// RUN: %clang_cc1 -verify %s
|
|
|
|
@protocol Protocol
|
|
- (oneway void) method;
|
|
@end
|
|
|
|
void accessMethodViaPropertySyntaxAndTriggerWarning(id<Protocol> object) {
|
|
object.method; // expected-warning {{property access result unused - getters should not be used for side effects}}
|
|
}
|
|
|
|
// rdar://19137815
|
|
#pragma clang diagnostic ignored "-Wunused-getter-return-value"
|
|
|
|
void accessMethodViaPropertySyntaxWhenWarningIsIgnoredDoesNotTriggerWarning(id<Protocol> object) {
|
|
object.method;
|
|
}
|
|
|