From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaObjC/property-5.m | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 clang/test/SemaObjC/property-5.m (limited to 'clang/test/SemaObjC/property-5.m') diff --git a/clang/test/SemaObjC/property-5.m b/clang/test/SemaObjC/property-5.m new file mode 100644 index 0000000..cd7cc24 --- /dev/null +++ b/clang/test/SemaObjC/property-5.m @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -verify %s + +@protocol P1 @end +@protocol P2 @end +@protocol P3 @end + +@interface NSData @end + +@interface MutableNSData : NSData @end + +@interface Base : NSData +@property(readonly) id ref; +@property(readonly) Base *p_base; +@property(readonly) NSData *nsdata; +@property(readonly) NSData * m_nsdata; +@end + +@interface Data : Base +@property(readonly) NSData *ref; +@property(readonly) Data *p_base; +@property(readonly) MutableNSData * m_nsdata; +@end + +@interface MutedData: Data +@property(readonly) id p_base; +@end + +@interface ConstData : Data +@property(readonly) ConstData *p_base; +@end + +void foo(Base *b, id x) { + [ b setRef: x ]; // expected-warning {{method '-setRef:' not found}} +} -- cgit v1.2.3