def ext_invalid_sign_spec : Extension<"'%0' cannot be signed or unsigned">;
def warn_receiver_forward_class : Warning<
"receiver %0 is a forward class and corresponding @interface may not exist">;
+def note_method_sent_forward_class : Note<"method %0 is used for the forward class">;
def warn_missing_declspec : Warning<
"declaration specifier missing, defaulting to 'int'">;
def warn_missing_type_specifier : Warning<
QualType returnType;
if (ClassDecl->isForwardDecl()) {
// A forward class used in messaging is tread as a 'Class'
+ Diag(lbrac, diag::warn_receiver_forward_class) << ClassDecl->getDeclName();
Method = LookupFactoryMethodInGlobalPool(Sel, SourceRange(lbrac,rbrac));
if (Method)
- Diag(lbrac, diag::warn_receiver_forward_class)
- << ClassDecl->getDeclName();
+ Diag(Method->getLocation(), diag::note_method_sent_forward_class)
+ << Method->getDeclName();
}
if (!Method)
Method = ClassDecl->lookupClassMethod(Context, Sel);
@implementation FooBazController
- (NSArray *)excitingStuff:(FooBaz *)options {
BugsBunnyType matchType = options.matchType;
- NSPredicate *isSearchablePredicate = [NSPredicate predicateWithFormat:@"isSearchable == YES"]; // expected-warning{{return type defaults to 'id'}}
+ NSPredicate *isSearchablePredicate = [NSPredicate predicateWithFormat:@"isSearchable == YES"]; // expected-warning{{receiver 'NSPredicate' is a forward class and corresponding}} // expected-warning{{return type defaults to 'id'}}
for (TazGuttenberg *Guttenberg in options.papyrus) {
NSArray *GuttenbergNodes = [Guttenberg nodes]; // expected-warning{{return type defaults to 'id'}}
NSArray *searchableNodes = [GuttenbergNodes filteredArrayUsingPredicate:isSearchablePredicate]; // expected-warning{{return type defaults to 'id'}}
// RUN: clang-cc -fsyntax-only -verify %s
@interface I
-+ new;
++ new; // expected-note {{method 'new' is used for the forward class}}
@end
Class isa;