[cfe-commits] r45301 - /cfe/trunk/test/Sema/objc-comptypes-6.m
Fariborz Jahanian
fjahanian at apple.com
Fri Dec 21 15:48:59 PST 2007
Author: fjahanian
Date: Fri Dec 21 17:48:59 2007
New Revision: 45301
URL: http://llvm.org/viewvc/llvm-project?rev=45301&view=rev
Log:
Another test for objective-c's type comparison.
Added:
cfe/trunk/test/Sema/objc-comptypes-6.m
Added: cfe/trunk/test/Sema/objc-comptypes-6.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/objc-comptypes-6.m?rev=45301&view=auto
==============================================================================
--- cfe/trunk/test/Sema/objc-comptypes-6.m (added)
+++ cfe/trunk/test/Sema/objc-comptypes-6.m Fri Dec 21 17:48:59 2007
@@ -0,0 +1,16 @@
+// RUN: clang -fsyntax-only -verify %s
+
+#include <objc/Object.h>
+
+ at interface Derived: Object
+ at end
+
+extern Object* foo(void);
+
+static Derived *test(void)
+{
+ Derived *m = foo(); // expected-warning {{incompatible pointer types assigning 'Object *' to 'Derived *'}}
+
+ return m;
+}
+
More information about the cfe-commits
mailing list