diff options
Diffstat (limited to 'test/SemaObjC/property-missing.m')
-rw-r--r-- | test/SemaObjC/property-missing.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/SemaObjC/property-missing.m b/test/SemaObjC/property-missing.m new file mode 100644 index 0000000..1aa94ce --- /dev/null +++ b/test/SemaObjC/property-missing.m @@ -0,0 +1,22 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +// PR3234 + +@protocol NSCopying @end +@interface NSObject @end + +void f1(NSObject *o) +{ + o.foo; // expected-error{{property 'foo' not found on object of type 'NSObject *'}} +} + +void f2(id<NSCopying> o) +{ + o.foo; // expected-error{{property 'foo' not found on object of type 'id<NSCopying>'}} +} + +void f3(id o) +{ + o.foo; // expected-error{{member reference base type 'id' is not a structure or union}} +} + |