aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/objc-pointer-conv.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/objc-pointer-conv.mm')
-rw-r--r--test/SemaObjCXX/objc-pointer-conv.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaObjCXX/objc-pointer-conv.mm b/test/SemaObjCXX/objc-pointer-conv.mm
index c03e3aaad3db..144bda4390d5 100644
--- a/test/SemaObjCXX/objc-pointer-conv.mm
+++ b/test/SemaObjCXX/objc-pointer-conv.mm
@@ -24,3 +24,15 @@ void RandomFunc(CFMDRef theDict, const void *key, const void *value);
RandomFunc((CFMDRef)dict, key, objects[3]);
}
@end
+
+@interface I
+- (void) Meth : (I*) Arg;
+@end
+
+void Func (I* arg); // expected-note {{candidate function not viable: no known conversion from 'I const *' to 'I *' for 1st argument}}
+
+void foo(const I *p, I* sel) {
+ [sel Meth : p]; // expected-error {{incompatible type sending 'I const *', expected 'I *'}}
+ Func(p); // expected-error {{no matching function for call to 'Func'}}
+}
+