diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-14 17:34:08 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-14 17:34:08 +0000 |
commit | 1cb83e24d4c278d559f4bc933e519c7e258e10fa (patch) | |
tree | c5aa920ffa4fbf6dd2ad7b447fd105b30e45aea9 | |
parent | 06b6ccfe900fede94b94cf6cfc38521f59b3b181 (diff) | |
download | bcm5719-llvm-1cb83e24d4c278d559f4bc933e519c7e258e10fa.tar.gz bcm5719-llvm-1cb83e24d4c278d559f4bc933e519c7e258e10fa.zip |
objc-arc: Improve arc diagnostic when method is not
found in receiver's class. // rdar://9970739
llvm-svn: 141961
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 3 | ||||
-rw-r--r-- | clang/test/SemaObjC/arc.m | 17 |
2 files changed, 18 insertions, 2 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 97a136f8955..ab4a843e145 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -2998,8 +2998,7 @@ def err_arc_method_not_found : Error< def err_arc_receiver_forward_class : Error< "receiver %0 for class message is a forward declaration">; def err_arc_may_not_respond : Error< - "receiver type %0 for instance message does not declare a method with " - "selector %1">; + "no visible @interface for %0 declares the selector %1">; def err_arc_receiver_forward_instance : Error< "receiver type %0 for instance message is a forward declaration">; def err_arc_collection_forward : Error< diff --git a/clang/test/SemaObjC/arc.m b/clang/test/SemaObjC/arc.m index dc5a1fe9220..ed6e60d8dc2 100644 --- a/clang/test/SemaObjC/arc.m +++ b/clang/test/SemaObjC/arc.m @@ -668,3 +668,20 @@ void test38() { void _NSCalc(NSColor* color, NSColor* bezelColors[]) __attribute__((unavailable("not available in automatic reference counting mode"))); void _NSCalcBeze(NSColor* color, NSColor* bezelColors[]); // expected-error {{must explicitly describe intended ownership of an object array parameter}} + +// rdar://9970739 +@interface RestaurantTableViewCell +- (void) restaurantLocation; +@end + +@interface Radar9970739 +- (void) Meth; +@end + +@implementation Radar9970739 +- (void) Meth { + RestaurantTableViewCell *cell; + [cell restaurantLocatoin]; // expected-error {{no visible @interface for 'RestaurantTableViewCell' declares the selector 'restaurantLocatoin'}} +} +@end + |