summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-12-19 17:27:57 +0000
committerAnders Carlsson <andersca@mac.com>2008-12-19 17:27:57 +0000
commit324de7ba46c961e5cce879f30f9be57a040c6a3e (patch)
treecc9f6652130241447f26ac2b1d319c5844b75ccd /clang/test/SemaObjC
parent9c148c8fc280b5dbf365b2235556f4869a309565 (diff)
downloadbcm5719-llvm-324de7ba46c961e5cce879f30f9be57a040c6a3e.tar.gz
bcm5719-llvm-324de7ba46c961e5cce879f30f9be57a040c6a3e.zip
Fix for PR3234
llvm-svn: 61245
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/property-missing.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/property-missing.m b/clang/test/SemaObjC/property-missing.m
new file mode 100644
index 00000000000..23af00646a9
--- /dev/null
+++ b/clang/test/SemaObjC/property-missing.m
@@ -0,0 +1,22 @@
+// RUN: clang -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}}
+}
+
OpenPOWER on IntegriCloud