summaryrefslogtreecommitdiff
path: root/test/SemaObjC/property-typecheck-1.m
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-03-30 13:33:51 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-03-30 13:33:51 +0000
commit225e636cbcb8567d8052d9b3049855d00679a727 (patch)
treefdf302374bfb5a96cafc1e2f9fdba70f22ca532d /test/SemaObjC/property-typecheck-1.m
parent4b446668ab142742ad2f2e34c92c66d28814aae9 (diff)
downloadclang-225e636cbcb8567d8052d9b3049855d00679a727.tar.gz
[Sema][ObjC] Avoid the "type of property does not match type of accessor"
warning for methods that resemble the setters of readonly properties rdar://30415679 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/property-typecheck-1.m')
-rw-r--r--test/SemaObjC/property-typecheck-1.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaObjC/property-typecheck-1.m b/test/SemaObjC/property-typecheck-1.m
index 5fb05c8bd3..85e8d4624b 100644
--- a/test/SemaObjC/property-typecheck-1.m
+++ b/test/SemaObjC/property-typecheck-1.m
@@ -78,6 +78,11 @@ typedef void (F)(void);
- (NSMutableArray*) pieces; // expected-note 2 {{declared here}}
- (NSArray*) first;
+
+// Don't warn about setter-like methods for readonly properties.
+- (void)setFirst:(char)val;
+- (void)setPieces:(char)val;
+
@end
@interface Class2 {