Split "incomplete implementation" warnings for ObjC into separate warnings.

Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes.  Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.

Implements <rdar://problem/13350414>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2013-03-27 00:02:21 +00:00
parent defa32ef4f
commit 8b43d2b0ea
18 changed files with 73 additions and 74 deletions

View File

@ -525,9 +525,8 @@ def err_conflicting_ivar_name : Error<
"conflicting instance variable names: %0 vs %1">; "conflicting instance variable names: %0 vs %1">;
def err_inconsistant_ivar_count : Error< def err_inconsistant_ivar_count : Error<
"inconsistent number of instance variables specified">; "inconsistent number of instance variables specified">;
def warn_incomplete_impl : Warning<"incomplete implementation">, def warn_undef_method_impl : Warning<"method definition for %0 not found">,
InGroup<DiagGroup<"incomplete-implementation">>; InGroup<DiagGroup<"incomplete-implementation">>;
def note_undef_method_impl : Note<"method definition for %0 not found">;
def note_required_for_protocol_at : def note_required_for_protocol_at :
Note<"required for direct or indirect protocol %0">; Note<"required for direct or indirect protocol %0">;

View File

@ -1177,14 +1177,18 @@ void Sema::WarnUndefinedMethod(SourceLocation ImpLoc, ObjCMethodDecl *method,
return; return;
} }
if (!IncompleteImpl) { // FIXME: For now ignore 'IncompleteImpl'.
Diag(ImpLoc, diag::warn_incomplete_impl); // Previously we grouped all unimplemented methods under a single
IncompleteImpl = true; // warning, but some users strongly voiced that they would prefer
} // separate warnings. We will give that approach a try, as that
if (DiagID == diag::warn_unimplemented_protocol_method) // matches what we do with protocols.
Diag(ImpLoc, DiagID) << method->getDeclName(); Diag(ImpLoc, DiagID) << method->getDeclName();
else
Diag(method->getLocation(), DiagID) << method->getDeclName(); // Issue a note to the original declaration.
SourceLocation MethodLoc = method->getLocStart();
if (MethodLoc.isValid())
Diag(MethodLoc, diag::note_method_declared_at) << method;
} }
/// Determines if type B can be substituted for type A. Returns true if we can /// Determines if type B can be substituted for type A. Returns true if we can
@ -1628,8 +1632,6 @@ void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc,
if (Diags.getDiagnosticLevel(DIAG, ImpLoc) if (Diags.getDiagnosticLevel(DIAG, ImpLoc)
!= DiagnosticsEngine::Ignored) { != DiagnosticsEngine::Ignored) {
WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG); WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG);
Diag(method->getLocation(), diag::note_method_declared_at)
<< method->getDeclName();
Diag(CDecl->getLocation(), diag::note_required_for_protocol_at) Diag(CDecl->getLocation(), diag::note_required_for_protocol_at)
<< PDecl->getDeclName(); << PDecl->getDeclName();
} }
@ -1651,8 +1653,6 @@ void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc,
if (Diags.getDiagnosticLevel(DIAG, ImpLoc) != if (Diags.getDiagnosticLevel(DIAG, ImpLoc) !=
DiagnosticsEngine::Ignored) { DiagnosticsEngine::Ignored) {
WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG); WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG);
Diag(method->getLocation(), diag::note_method_declared_at)
<< method->getDeclName();
Diag(IDecl->getLocation(), diag::note_required_for_protocol_at) << Diag(IDecl->getLocation(), diag::note_required_for_protocol_at) <<
PDecl->getDeclName(); PDecl->getDeclName();
} }
@ -1687,7 +1687,7 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap,
!InsMap.count((*I)->getSelector())) { !InsMap.count((*I)->getSelector())) {
if (ImmediateClass) if (ImmediateClass)
WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl, WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl,
diag::note_undef_method_impl); diag::warn_undef_method_impl);
continue; continue;
} else { } else {
ObjCMethodDecl *ImpMethodDecl = ObjCMethodDecl *ImpMethodDecl =
@ -1717,7 +1717,7 @@ void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap,
if (!ClsMap.count((*I)->getSelector())) { if (!ClsMap.count((*I)->getSelector())) {
if (ImmediateClass) if (ImmediateClass)
WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl, WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl,
diag::note_undef_method_impl); diag::warn_undef_method_impl);
} else { } else {
ObjCMethodDecl *ImpMethodDecl = ObjCMethodDecl *ImpMethodDecl =
IMPDecl->getClassMethod((*I)->getSelector()); IMPDecl->getClassMethod((*I)->getSelector());

View File

@ -1,4 +1,5 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 -Wno-incomplete-implementation %s
// expected-no-diagnostics
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Delta-debugging produced forward declarations. // Delta-debugging produced forward declarations.
@ -32,16 +33,16 @@ typedef struct _NSZone NSZone;
@protocol IHGoogleDocsAdapterDelegate - (void)googleDocsAdapter:(IHGoogleDocsAdapter*)inGoogleDocsAdapter accountVerifyIsValid:(BOOL)inIsValid error:(NSError *)inError; @protocol IHGoogleDocsAdapterDelegate - (void)googleDocsAdapter:(IHGoogleDocsAdapter*)inGoogleDocsAdapter accountVerifyIsValid:(BOOL)inIsValid error:(NSError *)inError;
@end @interface IHGoogleDocsAdapter : NSObject { @end @interface IHGoogleDocsAdapter : NSObject {
} }
- (NSArray *)entries; // expected-note {{method definition for 'entries' not found}} - (NSArray *)entries;
@end extern Class const kGDataUseRegisteredClass ; @end extern Class const kGDataUseRegisteredClass ;
@interface IHGoogleDocsAdapter () - (GDataFeedDocList *)feedDocList; // expected-note {{method definition for 'feedDocList' not found}} @interface IHGoogleDocsAdapter () - (GDataFeedDocList *)feedDocList;
- (NSArray *)directoryPathComponents; // expected-note {{method definition for 'directoryPathComponents' not found}} - (NSArray *)directoryPathComponents;
- (unsigned int)currentPathComponentIndex; // expected-note {{method definition for 'currentPathComponentIndex' not found}} - (unsigned int)currentPathComponentIndex;
- (void)setCurrentPathComponentIndex:(unsigned int)aCurrentPathComponentIndex; // expected-note {{method definition for 'setCurrentPathComponentIndex:' not found}} - (void)setCurrentPathComponentIndex:(unsigned int)aCurrentPathComponentIndex;
- (NSURL *)folderFeedURL; // expected-note {{method definition for 'folderFeedURL' not found}} - (NSURL *)folderFeedURL;
@end @end
@implementation IHGoogleDocsAdapter - (id)initWithUsername:(NSString *)inUsername password:(NSString *)inPassword owner:(NSObject <IHGoogleDocsAdapterDelegate> *)owner { // expected-warning {{incomplete implementation}} @implementation IHGoogleDocsAdapter - (id)initWithUsername:(NSString *)inUsername password:(NSString *)inPassword owner:(NSObject <IHGoogleDocsAdapterDelegate> *)owner {
return 0; return 0;
} }

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -analyzer-checker=core -verify %s // RUN: %clang_cc1 -analyzer-checker=core -verify %s -Wno-incomplete-implementation
typedef signed char BOOL; typedef signed char BOOL;
typedef int NSInteger; typedef int NSInteger;
typedef unsigned int NSUInteger; typedef unsigned int NSUInteger;
@ -70,9 +70,9 @@ extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExpos
@interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> { // expected-note {{required for direct or indirect protocol 'PBXSelectionTarget'}} @interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> { // expected-note {{required for direct or indirect protocol 'PBXSelectionTarget'}}
XCExtendedTabView *_perspectivesTabView; XCExtendedTabView *_perspectivesTabView;
} }
- (PBXModule *) moduleForTab:(NSTabViewItem *)item; // expected-note {{method definition for 'moduleForTab:' not found}} - (PBXModule *) moduleForTab:(NSTabViewItem *)item;
@end @end
@implementation XCPerspectiveModule // expected-warning {{incomplete implementation}} expected-warning {{method 'performAction:withSelection:' in protocol not implemented}}} @implementation XCPerspectiveModule // expected-warning {{method 'performAction:withSelection:' in protocol not implemented}}}
+ (void) openForProjectDocument:(PBXProjectDocument *)projectDocument { + (void) openForProjectDocument:(PBXProjectDocument *)projectDocument {
} }
- (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data { - (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data {

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-incomplete-implementation -verify %s
// This test case was crashing due to how CFRefCount.cpp resolved the // This test case was crashing due to how CFRefCount.cpp resolved the
// ObjCInterfaceDecl* and ClassName in EvalObjCMessageExpr. // ObjCInterfaceDecl* and ClassName in EvalObjCMessageExpr.
@ -47,14 +47,14 @@ CMProfileLocation;
@interface GBCategoryChooserPanelController : NSWindowController { @interface GBCategoryChooserPanelController : NSWindowController {
GSEbayCategory *rootCategory; GSEbayCategory *rootCategory;
} }
- (NSMutableDictionary*)categoryDictionaryForCategoryID:(int)inID inRootTreeCategories:(NSMutableArray*)inRootTreeCategories; // expected-note {{method definition for 'categoryDictionaryForCategoryID:inRootTreeCategories:' not found}} - (NSMutableDictionary*)categoryDictionaryForCategoryID:(int)inID inRootTreeCategories:(NSMutableArray*)inRootTreeCategories;
-(NSString*) categoryID; // expected-note {{method definition for 'categoryID' not found}} expected-note {{using}} -(NSString*) categoryID; // expected-note {{using}}
@end @interface GSEbayCategory : NSObject <NSCoding> { @end @interface GSEbayCategory : NSObject <NSCoding> {
} }
- (int) categoryID; // expected-note {{also found}} - (int) categoryID; // expected-note {{also found}}
- (GSEbayCategory *) parent; - (GSEbayCategory *) parent;
- (GSEbayCategory*) subcategoryWithID:(int) inID; - (GSEbayCategory*) subcategoryWithID:(int) inID;
@end @implementation GBCategoryChooserPanelController + (int) chooseCategoryIDFromCategories:(NSArray*) inCategories searchRequest:(GBSearchRequest*)inRequest parentWindow:(NSWindow*) inParent { // expected-warning {{incomplete implementation}} @end @implementation GBCategoryChooserPanelController + (int) chooseCategoryIDFromCategories:(NSArray*) inCategories searchRequest:(GBSearchRequest*)inRequest parentWindow:(NSWindow*) inParent {
return 0; return 0;
} }
- (void) addCategory:(EBayCategoryType*)inCategory toRootTreeCategory:(NSMutableArray*)inRootTreeCategories { - (void) addCategory:(EBayCategoryType*)inCategory toRootTreeCategory:(NSMutableArray*)inRootTreeCategories {

View File

@ -71,8 +71,7 @@
@interface MultipleCat_I() <MultipleCat_P> @end @interface MultipleCat_I() <MultipleCat_P> @end
@implementation MultipleCat_I // expected-warning {{incomplete implementation}} \ @implementation MultipleCat_I // expected-warning {{method 'im0' in protocol not implemented}}
// expected-warning {{method 'im0' in protocol not implemented}}
@end @end
// <rdar://problem/7680391> - Handle nameless categories with no name that refer // <rdar://problem/7680391> - Handle nameless categories with no name that refer

View File

@ -23,8 +23,7 @@ extern NSString * const NSTaskDidTerminateNotification;
- (NSString *)evaluateAsStringInContext:(XCPropertyExpansionContext *)context withNestingState:(const void *)state; - (NSString *)evaluateAsStringInContext:(XCPropertyExpansionContext *)context withNestingState:(const void *)state;
@end @end
@implementation XCPropertyExpansionContext // expected-warning {{incomplete implementation}} \ @implementation XCPropertyExpansionContext // expected-warning {{method 'copyWithZone:' in protocol not implemented}}
// expected-warning {{method 'copyWithZone:' in protocol not implemented}}
- (NSString *)expandedValueForProperty:(NSString *)property { - (NSString *)expandedValueForProperty:(NSString *)property {
id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}} id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}}
if (cachedValueNode == ((void *)0)) { } if (cachedValueNode == ((void *)0)) { }

View File

@ -21,10 +21,10 @@
@end @end
@interface DTFilterOutputStream2 @interface DTFilterOutputStream2
- nextOutputStream; // expected-note {{method definition for 'nextOutputStream' not found}} - nextOutputStream; // expected-note {{method 'nextOutputStream' declared here}}
@end @end
@implementation DTFilterOutputStream2 // expected-warning {{incomplete implementation}} @implementation DTFilterOutputStream2 // expected-warning {{method definition for 'nextOutputStream' not found}}
- (id)initWithNextOutputStream:(id <DTOutputStreams>) outputStream { - (id)initWithNextOutputStream:(id <DTOutputStreams>) outputStream {
id <DTOutputStreams> nextOutputStream = [self nextOutputStream]; id <DTOutputStreams> nextOutputStream = [self nextOutputStream];
self = nextOutputStream; // expected-warning {{assigning to 'DTFilterOutputStream2 *' from incompatible type 'id<DTOutputStreams>'}} self = nextOutputStream; // expected-warning {{assigning to 'DTFilterOutputStream2 *' from incompatible type 'id<DTOutputStreams>'}}

View File

@ -16,6 +16,5 @@
@end @end
@implementation IBImageCatalogDocument // expected-warning {{auto property synthesis will not synthesize property declared in a protocol}} \ @implementation IBImageCatalogDocument // expected-warning {{auto property synthesis will not synthesize property declared in a protocol}} \
// expected-warning {{incomplete implementation}} \
// expected-warning {{method 'invalidate' in protocol not implemented}} // expected-warning {{method 'invalidate' in protocol not implemented}}
@end @end

View File

@ -5,8 +5,8 @@ typedef struct _NSRange { } NSRange;
@class PBXFileReference; @class PBXFileReference;
@interface PBXDocBookmark @interface PBXDocBookmark
+ alloc; // expected-note {{method definition for 'alloc' not found}} + alloc; // expected-note {{method 'alloc' declared here}}
- autorelease; // expected-note {{method definition for 'autorelease' not found}} - autorelease; // expected-note {{method 'autorelease' declared here}}
@end @end
// GCC allows pointer expressions in integer constant expressions. // GCC allows pointer expressions in integer constant expressions.
@ -14,7 +14,8 @@ struct {
char control[((int)(char *)2)]; char control[((int)(char *)2)];
} xx; } xx;
@implementation PBXDocBookmark // expected-warning {{incomplete implementation}} @implementation PBXDocBookmark // expected-warning {{method definition for 'autorelease' not found}}\
// expected-warning {{method definition for 'alloc' not found}}
+ (id)bookmarkWithFileReference:(PBXFileReference *)fileRef gylphRange:(NSRange)range anchor:(NSString *)htmlAnchor + (id)bookmarkWithFileReference:(PBXFileReference *)fileRef gylphRange:(NSRange)range anchor:(NSString *)htmlAnchor
{ {

View File

@ -1,13 +1,12 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
@interface I @interface I
- Meth; // expected-note{{method definition for 'Meth' not found}} \ - Meth; // expected-note 2 {{method 'Meth' declared here}}
// expected-note{{method 'Meth' declared here}}
- unavailableMeth __attribute__((availability(macosx,unavailable))); - unavailableMeth __attribute__((availability(macosx,unavailable)));
- unavailableMeth2 __attribute__((unavailable)); - unavailableMeth2 __attribute__((unavailable));
@end @end
@implementation I // expected-warning{{incomplete implementation}} @implementation I // expected-warning {{method definition for 'Meth' not found}}
@end @end
@implementation I(CAT) @implementation I(CAT)

View File

@ -9,20 +9,20 @@
@end @end
@interface MyClass1(CAT) <P> // expected-note {{required for direct or indirect protocol 'P'}} @interface MyClass1(CAT) <P> // expected-note {{required for direct or indirect protocol 'P'}}
- (void) meth2; // expected-note {{method definition for 'meth2' not found}} - (void) meth2; // expected-note {{method 'meth2' declared here}}
@end @end
@implementation MyClass1(CAT) // expected-warning {{incomplete implementation}} \ @implementation MyClass1(CAT) // expected-warning {{method 'Pmeth' in protocol not implemented}} \
// expected-warning {{method 'Pmeth' in protocol not implemented}} // expected-warning {{method definition for 'meth2' not found}}
- (void) Pmeth1{} - (void) Pmeth1{}
@end @end
@interface MyClass1(DOG) <P> // expected-note {{required for direct or indirect protocol 'P'}} @interface MyClass1(DOG) <P> // expected-note {{required for direct or indirect protocol 'P'}}
- (void)ppp; // expected-note {{method definition for 'ppp' not found}} - (void)ppp; // expected-note {{method 'ppp' declared here}}
@end @end
@implementation MyClass1(DOG) // expected-warning {{incomplete implementation}} \ @implementation MyClass1(DOG) // expected-warning {{method 'Pmeth1' in protocol not implemented}} \
// expected-warning {{method 'Pmeth1' in protocol not implemented}} // expected-warning {{method definition for 'ppp' not found}}
- (void) Pmeth {} - (void) Pmeth {}
@end @end

View File

@ -10,7 +10,7 @@
// Class extension // Class extension
@interface MyClass () <P> @interface MyClass () <P>
- (void)meth2; // expected-note {{method definition for 'meth2' not found}} - (void)meth2; // expected-note {{method 'meth2' declared here}}
@end @end
// Add a category to test that clang does not emit warning for this method. // Add a category to test that clang does not emit warning for this method.
@ -18,7 +18,7 @@
- (void)categoryMethod; - (void)categoryMethod;
@end @end
@implementation MyClass // expected-warning {{incomplete implementation}} \ @implementation MyClass // expected-warning {{method 'Pmeth1' in protocol not implemented}} \
// expected-warning {{method 'Pmeth1' in protocol not implemented}} // expected-warning {{method definition for 'meth2' not found}}
- (void)Pmeth {} - (void)Pmeth {}
@end @end

View File

@ -3,12 +3,14 @@
@interface INTF @interface INTF
- (void) meth; - (void) meth;
- (void) meth : (int) arg1; - (void) meth : (int) arg1;
- (int) int_meth; // expected-note {{method definition for 'int_meth' not found}} - (int) int_meth; // expected-note {{method 'int_meth' declared here}}
+ (int) cls_meth; // expected-note {{method definition for 'cls_meth' not found}} + (int) cls_meth; // expected-note {{method 'cls_meth' declared here}}
+ (void) cls_meth1 : (int) arg1; // expected-note {{method definition for 'cls_meth1:' not found}} + (void) cls_meth1 : (int) arg1; // expected-note {{method 'cls_meth1:' declared here}}
@end @end
@implementation INTF // expected-warning {{incomplete implementation}} @implementation INTF // expected-warning {{method definition for 'int_meth' not found}} \
// expected-warning {{method definition for 'cls_meth' not found}} \
// expected-warning {{method definition for 'cls_meth1:' not found}}
- (void) meth {} - (void) meth {}
- (void) meth : (int) arg2{} - (void) meth : (int) arg2{}
- (void) cls_meth1 : (int) arg2{} - (void) cls_meth1 : (int) arg2{}
@ -17,12 +19,14 @@
@interface INTF1 @interface INTF1
- (void) meth; - (void) meth;
- (void) meth : (int) arg1; - (void) meth : (int) arg1;
- (int) int_meth; // expected-note {{method definition for 'int_meth' not found}} - (int) int_meth; // expected-note {{method 'int_meth' declared here}}
+ (int) cls_meth; // expected-note {{method definition for 'cls_meth' not found}} + (int) cls_meth; // expected-note {{method 'cls_meth' declared here}}
+ (void) cls_meth1 : (int) arg1; // expected-note {{method definition for 'cls_meth1:' not found}} + (void) cls_meth1 : (int) arg1; // expected-note {{method 'cls_meth1:' declared here}}
@end @end
@implementation INTF1 // expected-warning {{incomplete implementation}} @implementation INTF1 // expected-warning {{method definition for 'int_meth' not found}} \
// expected-warning {{method definition for 'cls_meth' not found}} \
// expected-warning {{method definition for 'cls_meth1:' not found}}
- (void) meth {} - (void) meth {}
- (void) meth : (int) arg2{} - (void) meth : (int) arg2{}
- (void) cls_meth1 : (int) arg2{} - (void) cls_meth1 : (int) arg2{}

View File

@ -17,9 +17,9 @@
// Test2 // Test2
@interface super - PMeth; @end @interface super - PMeth; @end
@interface J : super <P> @interface J : super <P>
- PMeth; // expected-note {{method definition for 'PMeth' not found}} - PMeth; // expected-note {{method 'PMeth' declared here}}
@end @end
@implementation J @end // expected-warning {{incomplete implementation}} @implementation J @end // expected-warning {{method definition for 'PMeth' not found}}
// Test3 // Test3
@interface K : super <P> @interface K : super <P>

View File

@ -37,11 +37,12 @@ void FUNC () {
@interface rdar8747333 () @interface rdar8747333 ()
- (NSObject *)bam; - (NSObject *)bam;
- (NSObject *)warn; // expected-note {{method definition for 'warn' not found}} - (NSObject *)warn; // expected-note {{method 'warn' declared here}}
- (void)setWarn : (NSObject *)val; // expected-note {{method definition for 'setWarn:' not found}} - (void)setWarn : (NSObject *)val; // expected-note {{method 'setWarn:' declared here}}
@end @end
@implementation rdar8747333 // expected-warning {{incomplete implementation}} @implementation rdar8747333 // expected-warning {{method definition for 'warn' not found}} \
// expected-warning {{method definition for 'setWarn:' not found}}
@synthesize bar = _bar; @synthesize bar = _bar;
@synthesize baz = _baz; @synthesize baz = _baz;
@synthesize bam = _bam; @synthesize bam = _bam;

View File

@ -28,10 +28,7 @@
// expected-note 2 {{required for direct or indirect protocol 'P2'}} // expected-note 2 {{required for direct or indirect protocol 'P2'}}
@end @end
@implementation INTF // expected-warning {{incomplete implementation}} \ @implementation INTF // expected-warning 9 {{in protocol not implemented}}
// expected-warning 9 {{in protocol not implemented}}
- (void) DefP1proto{} - (void) DefP1proto{}
+ (void) DefClsP3Proto{} + (void) DefClsP3Proto{}
@end @end

View File

@ -15,11 +15,11 @@
- method:(id) second:(id)second; // expected-warning {{'second' used as the name of the previous parameter rather than as part of the selector}} \ - method:(id) second:(id)second; // expected-warning {{'second' used as the name of the previous parameter rather than as part of the selector}} \
// expected-note {{introduce a parameter name to make 'second' part of the selector}} \ // expected-note {{introduce a parameter name to make 'second' part of the selector}} \
// expected-note {{or insert whitespace before ':' to use 'second' as parameter name and have an empty entry in the selector}} \ // expected-note {{or insert whitespace before ':' to use 'second' as parameter name and have an empty entry in the selector}} \
// expected-note {{method definition for 'method::' not found}} // expected-note {{method 'method::' declared here}}
@end @end
@implementation INTF // expected-warning {{incomplete implementation}} @implementation INTF // expected-warning {{method definition for 'method::' not found}}
-(void) Name1:(id)Arg1 Name2:(id)Arg2{} -(void) Name1:(id)Arg1 Name2:(id)Arg2{}
-(void) Name1:(id) Name2:(id)Arg2 {} // expected-warning {{'Name2' used as the name of the previous parameter rather than as part of the selector}} \ -(void) Name1:(id) Name2:(id)Arg2 {} // expected-warning {{'Name2' used as the name of the previous parameter rather than as part of the selector}} \
// expected-note {{introduce a parameter name to make 'Name2' part of the selector}} \ // expected-note {{introduce a parameter name to make 'Name2' part of the selector}} \