r178097 - Split "incomplete implementation" warnings for ObjC into separate warnings.
Ted Kremenek
kremenek at apple.com
Tue Mar 26 17:02:21 PDT 2013
Author: kremenek
Date: Tue Mar 26 19:02:21 2013
New Revision: 178097
URL: http://llvm.org/viewvc/llvm-project?rev=178097&view=rev
Log:
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>
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/test/Analysis/PR3991.m
cfe/trunk/test/Analysis/method-arg-decay.m
cfe/trunk/test/Analysis/pr4209.m
cfe/trunk/test/SemaObjC/category-1.m
cfe/trunk/test/SemaObjC/compare-qualified-id.m
cfe/trunk/test/SemaObjC/conditional-expr.m
cfe/trunk/test/SemaObjC/forward-protocol-incomplete-impl-warn.m
cfe/trunk/test/SemaObjC/gcc-cast-ext.m
cfe/trunk/test/SemaObjC/incomplete-implementation.m
cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m
cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m
cfe/trunk/test/SemaObjC/method-undefined-warn-1.m
cfe/trunk/test/SemaObjC/no-protocol-option-tests.m
cfe/trunk/test/SemaObjC/property-in-class-extension.m
cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m
cfe/trunk/test/SemaObjC/warning-missing-selector-name.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Mar 26 19:02:21 2013
@@ -525,9 +525,8 @@ def err_conflicting_ivar_name : Error<
"conflicting instance variable names: %0 vs %1">;
def err_inconsistant_ivar_count : Error<
"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">>;
-def note_undef_method_impl : Note<"method definition for %0 not found">;
def note_required_for_protocol_at :
Note<"required for direct or indirect protocol %0">;
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Tue Mar 26 19:02:21 2013
@@ -1177,14 +1177,18 @@ void Sema::WarnUndefinedMethod(SourceLoc
return;
}
- if (!IncompleteImpl) {
- Diag(ImpLoc, diag::warn_incomplete_impl);
- IncompleteImpl = true;
- }
- if (DiagID == diag::warn_unimplemented_protocol_method)
- Diag(ImpLoc, DiagID) << method->getDeclName();
- else
- Diag(method->getLocation(), DiagID) << method->getDeclName();
+ // FIXME: For now ignore 'IncompleteImpl'.
+ // Previously we grouped all unimplemented methods under a single
+ // warning, but some users strongly voiced that they would prefer
+ // separate warnings. We will give that approach a try, as that
+ // matches what we do with protocols.
+
+ Diag(ImpLoc, 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
@@ -1628,8 +1632,6 @@ void Sema::CheckProtocolMethodDefs(Sourc
if (Diags.getDiagnosticLevel(DIAG, ImpLoc)
!= DiagnosticsEngine::Ignored) {
WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG);
- Diag(method->getLocation(), diag::note_method_declared_at)
- << method->getDeclName();
Diag(CDecl->getLocation(), diag::note_required_for_protocol_at)
<< PDecl->getDeclName();
}
@@ -1651,8 +1653,6 @@ void Sema::CheckProtocolMethodDefs(Sourc
if (Diags.getDiagnosticLevel(DIAG, ImpLoc) !=
DiagnosticsEngine::Ignored) {
WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG);
- Diag(method->getLocation(), diag::note_method_declared_at)
- << method->getDeclName();
Diag(IDecl->getLocation(), diag::note_required_for_protocol_at) <<
PDecl->getDeclName();
}
@@ -1687,7 +1687,7 @@ void Sema::MatchAllMethodDeclarations(co
!InsMap.count((*I)->getSelector())) {
if (ImmediateClass)
WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl,
- diag::note_undef_method_impl);
+ diag::warn_undef_method_impl);
continue;
} else {
ObjCMethodDecl *ImpMethodDecl =
@@ -1717,7 +1717,7 @@ void Sema::MatchAllMethodDeclarations(co
if (!ClsMap.count((*I)->getSelector())) {
if (ImmediateClass)
WarnUndefinedMethod(IMPDecl->getLocation(), *I, IncompleteImpl,
- diag::note_undef_method_impl);
+ diag::warn_undef_method_impl);
} else {
ObjCMethodDecl *ImpMethodDecl =
IMPDecl->getClassMethod((*I)->getSelector());
Modified: cfe/trunk/test/Analysis/PR3991.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/PR3991.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/PR3991.m (original)
+++ cfe/trunk/test/Analysis/PR3991.m Tue Mar 26 19:02:21 2013
@@ -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.
@@ -32,16 +33,16 @@ typedef struct _NSZone NSZone;
@protocol IHGoogleDocsAdapterDelegate - (void)googleDocsAdapter:(IHGoogleDocsAdapter*)inGoogleDocsAdapter accountVerifyIsValid:(BOOL)inIsValid error:(NSError *)inError;
@end @interface IHGoogleDocsAdapter : NSObject {
}
-- (NSArray *)entries; // expected-note {{method definition for 'entries' not found}}
+- (NSArray *)entries;
@end extern Class const kGDataUseRegisteredClass ;
- at interface IHGoogleDocsAdapter () - (GDataFeedDocList *)feedDocList; // expected-note {{method definition for 'feedDocList' not found}}
-- (NSArray *)directoryPathComponents; // expected-note {{method definition for 'directoryPathComponents' not found}}
-- (unsigned int)currentPathComponentIndex; // expected-note {{method definition for 'currentPathComponentIndex' not found}}
-- (void)setCurrentPathComponentIndex:(unsigned int)aCurrentPathComponentIndex; // expected-note {{method definition for 'setCurrentPathComponentIndex:' not found}}
-- (NSURL *)folderFeedURL; // expected-note {{method definition for 'folderFeedURL' not found}}
+ at interface IHGoogleDocsAdapter () - (GDataFeedDocList *)feedDocList;
+- (NSArray *)directoryPathComponents;
+- (unsigned int)currentPathComponentIndex;
+- (void)setCurrentPathComponentIndex:(unsigned int)aCurrentPathComponentIndex;
+- (NSURL *)folderFeedURL;
@end
- at implementation IHGoogleDocsAdapter - (id)initWithUsername:(NSString *)inUsername password:(NSString *)inPassword owner:(NSObject <IHGoogleDocsAdapterDelegate> *)owner { // expected-warning {{incomplete implementation}}
+ at implementation IHGoogleDocsAdapter - (id)initWithUsername:(NSString *)inUsername password:(NSString *)inPassword owner:(NSObject <IHGoogleDocsAdapterDelegate> *)owner {
return 0;
}
Modified: cfe/trunk/test/Analysis/method-arg-decay.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/method-arg-decay.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/method-arg-decay.m (original)
+++ cfe/trunk/test/Analysis/method-arg-decay.m Tue Mar 26 19:02:21 2013
@@ -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 int NSInteger;
typedef unsigned int NSUInteger;
@@ -70,9 +70,9 @@ extern NSMutableArray *XCFindPossibleKey
@interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> { // expected-note {{required for direct or indirect protocol 'PBXSelectionTarget'}}
XCExtendedTabView *_perspectivesTabView;
}
-- (PBXModule *) moduleForTab:(NSTabViewItem *)item; // expected-note {{method definition for 'moduleForTab:' not found}}
+- (PBXModule *) moduleForTab:(NSTabViewItem *)item;
@end
- at implementation XCPerspectiveModule // expected-warning {{incomplete implementation}} expected-warning {{method 'performAction:withSelection:' in protocol not implemented}}}
+ at implementation XCPerspectiveModule // expected-warning {{method 'performAction:withSelection:' in protocol not implemented}}}
+ (void) openForProjectDocument:(PBXProjectDocument *)projectDocument {
}
- (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data {
Modified: cfe/trunk/test/Analysis/pr4209.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/pr4209.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/pr4209.m (original)
+++ cfe/trunk/test/Analysis/pr4209.m Tue Mar 26 19:02:21 2013
@@ -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
// ObjCInterfaceDecl* and ClassName in EvalObjCMessageExpr.
@@ -47,14 +47,14 @@ CMProfileLocation;
@interface GBCategoryChooserPanelController : NSWindowController {
GSEbayCategory *rootCategory;
}
-- (NSMutableDictionary*)categoryDictionaryForCategoryID:(int)inID inRootTreeCategories:(NSMutableArray*)inRootTreeCategories; // expected-note {{method definition for 'categoryDictionaryForCategoryID:inRootTreeCategories:' not found}}
--(NSString*) categoryID; // expected-note {{method definition for 'categoryID' not found}} expected-note {{using}}
+- (NSMutableDictionary*)categoryDictionaryForCategoryID:(int)inID inRootTreeCategories:(NSMutableArray*)inRootTreeCategories;
+-(NSString*) categoryID; // expected-note {{using}}
@end @interface GSEbayCategory : NSObject <NSCoding> {
}
- (int) categoryID; // expected-note {{also found}}
- (GSEbayCategory *) parent;
- (GSEbayCategory*) subcategoryWithID:(int) inID;
- at end @implementation GBCategoryChooserPanelController + (int) chooseCategoryIDFromCategories:(NSArray*) inCategories searchRequest:(GBSearchRequest*)inRequest parentWindow:(NSWindow*) inParent { // expected-warning {{incomplete implementation}}
+ at end @implementation GBCategoryChooserPanelController + (int) chooseCategoryIDFromCategories:(NSArray*) inCategories searchRequest:(GBSearchRequest*)inRequest parentWindow:(NSWindow*) inParent {
return 0;
}
- (void) addCategory:(EBayCategoryType*)inCategory toRootTreeCategory:(NSMutableArray*)inRootTreeCategories {
Modified: cfe/trunk/test/SemaObjC/category-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/category-1.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/category-1.m (original)
+++ cfe/trunk/test/SemaObjC/category-1.m Tue Mar 26 19:02:21 2013
@@ -71,8 +71,7 @@
@interface MultipleCat_I() <MultipleCat_P> @end
- at implementation MultipleCat_I // expected-warning {{incomplete implementation}} \
- // expected-warning {{method 'im0' in protocol not implemented}}
+ at implementation MultipleCat_I // expected-warning {{method 'im0' in protocol not implemented}}
@end
// <rdar://problem/7680391> - Handle nameless categories with no name that refer
Modified: cfe/trunk/test/SemaObjC/compare-qualified-id.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/compare-qualified-id.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/compare-qualified-id.m (original)
+++ cfe/trunk/test/SemaObjC/compare-qualified-id.m Tue Mar 26 19:02:21 2013
@@ -23,8 +23,7 @@ extern NSString * const NSTaskDidTermina
- (NSString *)evaluateAsStringInContext:(XCPropertyExpansionContext *)context withNestingState:(const void *)state;
@end
- at implementation XCPropertyExpansionContext // expected-warning {{incomplete implementation}} \
- // expected-warning {{method 'copyWithZone:' in protocol not implemented}}
+ at implementation XCPropertyExpansionContext // expected-warning {{method 'copyWithZone:' in protocol not implemented}}
- (NSString *)expandedValueForProperty:(NSString *)property {
id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}}
if (cachedValueNode == ((void *)0)) { }
Modified: cfe/trunk/test/SemaObjC/conditional-expr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conditional-expr.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr.m Tue Mar 26 19:02:21 2013
@@ -21,10 +21,10 @@
@end
@interface DTFilterOutputStream2
-- nextOutputStream; // expected-note {{method definition for 'nextOutputStream' not found}}
+- nextOutputStream; // expected-note {{method 'nextOutputStream' declared here}}
@end
- at implementation DTFilterOutputStream2 // expected-warning {{incomplete implementation}}
+ at implementation DTFilterOutputStream2 // expected-warning {{method definition for 'nextOutputStream' not found}}
- (id)initWithNextOutputStream:(id <DTOutputStreams>) outputStream {
id <DTOutputStreams> nextOutputStream = [self nextOutputStream];
self = nextOutputStream; // expected-warning {{assigning to 'DTFilterOutputStream2 *' from incompatible type 'id<DTOutputStreams>'}}
Modified: cfe/trunk/test/SemaObjC/forward-protocol-incomplete-impl-warn.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/forward-protocol-incomplete-impl-warn.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/forward-protocol-incomplete-impl-warn.m (original)
+++ cfe/trunk/test/SemaObjC/forward-protocol-incomplete-impl-warn.m Tue Mar 26 19:02:21 2013
@@ -16,6 +16,5 @@
@end
@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}}
@end
Modified: cfe/trunk/test/SemaObjC/gcc-cast-ext.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/gcc-cast-ext.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/gcc-cast-ext.m (original)
+++ cfe/trunk/test/SemaObjC/gcc-cast-ext.m Tue Mar 26 19:02:21 2013
@@ -5,8 +5,8 @@ typedef struct _NSRange { } NSRange;
@class PBXFileReference;
@interface PBXDocBookmark
-+ alloc; // expected-note {{method definition for 'alloc' not found}}
-- autorelease; // expected-note {{method definition for 'autorelease' not found}}
++ alloc; // expected-note {{method 'alloc' declared here}}
+- autorelease; // expected-note {{method 'autorelease' declared here}}
@end
// GCC allows pointer expressions in integer constant expressions.
@@ -14,7 +14,8 @@ struct {
char control[((int)(char *)2)];
} xx;
- at implementation PBXDocBookmark // expected-warning {{incomplete implementation}}
+ at 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
{
Modified: cfe/trunk/test/SemaObjC/incomplete-implementation.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/incomplete-implementation.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/incomplete-implementation.m (original)
+++ cfe/trunk/test/SemaObjC/incomplete-implementation.m Tue Mar 26 19:02:21 2013
@@ -1,13 +1,12 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
@interface I
-- Meth; // expected-note{{method definition for 'Meth' not found}} \
- // expected-note{{method 'Meth' declared here}}
+- Meth; // expected-note 2 {{method 'Meth' declared here}}
- unavailableMeth __attribute__((availability(macosx,unavailable)));
- unavailableMeth2 __attribute__((unavailable));
@end
- at implementation I // expected-warning{{incomplete implementation}}
+ at implementation I // expected-warning {{method definition for 'Meth' not found}}
@end
@implementation I(CAT)
Modified: cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m Tue Mar 26 19:02:21 2013
@@ -4,25 +4,25 @@
@end
@protocol P
-- (void) Pmeth; // expected-note {{method 'Pmeth' declared here}}
-- (void) Pmeth1; // expected-note {{method 'Pmeth1' declared here}}
+- (void) Pmeth; // expected-note {{method 'Pmeth' declared here}}
+- (void) Pmeth1; // expected-note {{method 'Pmeth1' declared here}}
@end
@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
- at implementation MyClass1(CAT) // expected-warning {{incomplete implementation}} \
- // expected-warning {{method 'Pmeth' in protocol not implemented}}
+ at implementation MyClass1(CAT) // expected-warning {{method 'Pmeth' in protocol not implemented}} \
+ // expected-warning {{method definition for 'meth2' not found}}
- (void) Pmeth1{}
@end
@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
- at implementation MyClass1(DOG) // expected-warning {{incomplete implementation}} \
- // expected-warning {{method 'Pmeth1' in protocol not implemented}}
+ at implementation MyClass1(DOG) // expected-warning {{method 'Pmeth1' in protocol not implemented}} \
+ // expected-warning {{method definition for 'ppp' not found}}
- (void) Pmeth {}
@end
Modified: cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m Tue Mar 26 19:02:21 2013
@@ -10,7 +10,7 @@
// Class extension
@interface MyClass () <P>
-- (void)meth2; // expected-note {{method definition for 'meth2' not found}}
+- (void)meth2; // expected-note {{method 'meth2' declared here}}
@end
// Add a category to test that clang does not emit warning for this method.
@@ -18,7 +18,7 @@
- (void)categoryMethod;
@end
- at implementation MyClass // expected-warning {{incomplete implementation}} \
- // expected-warning {{method 'Pmeth1' in protocol not implemented}}
+ at implementation MyClass // expected-warning {{method 'Pmeth1' in protocol not implemented}} \
+ // expected-warning {{method definition for 'meth2' not found}}
- (void)Pmeth {}
@end
Modified: cfe/trunk/test/SemaObjC/method-undefined-warn-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-undefined-warn-1.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-undefined-warn-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-undefined-warn-1.m Tue Mar 26 19:02:21 2013
@@ -3,12 +3,14 @@
@interface INTF
- (void) meth;
- (void) meth : (int) arg1;
-- (int) int_meth; // expected-note {{method definition for 'int_meth' not found}}
-+ (int) cls_meth; // expected-note {{method definition for 'cls_meth' not found}}
-+ (void) cls_meth1 : (int) arg1; // expected-note {{method definition for 'cls_meth1:' not found}}
+- (int) int_meth; // expected-note {{method 'int_meth' declared here}}
++ (int) cls_meth; // expected-note {{method 'cls_meth' declared here}}
++ (void) cls_meth1 : (int) arg1; // expected-note {{method 'cls_meth1:' declared here}}
@end
- at implementation INTF // expected-warning {{incomplete implementation}}
+ at 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 : (int) arg2{}
- (void) cls_meth1 : (int) arg2{}
@@ -17,12 +19,14 @@
@interface INTF1
- (void) meth;
- (void) meth : (int) arg1;
-- (int) int_meth; // expected-note {{method definition for 'int_meth' not found}}
-+ (int) cls_meth; // expected-note {{method definition for 'cls_meth' not found}}
-+ (void) cls_meth1 : (int) arg1; // expected-note {{method definition for 'cls_meth1:' not found}}
+- (int) int_meth; // expected-note {{method 'int_meth' declared here}}
++ (int) cls_meth; // expected-note {{method 'cls_meth' declared here}}
++ (void) cls_meth1 : (int) arg1; // expected-note {{method 'cls_meth1:' declared here}}
@end
- at implementation INTF1 // expected-warning {{incomplete implementation}}
+ at 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 : (int) arg2{}
- (void) cls_meth1 : (int) arg2{}
Modified: cfe/trunk/test/SemaObjC/no-protocol-option-tests.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/no-protocol-option-tests.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/no-protocol-option-tests.m (original)
+++ cfe/trunk/test/SemaObjC/no-protocol-option-tests.m Tue Mar 26 19:02:21 2013
@@ -17,9 +17,9 @@
// Test2
@interface super - PMeth; @end
@interface J : super <P>
-- PMeth; // expected-note {{method definition for 'PMeth' not found}}
+- PMeth; // expected-note {{method 'PMeth' declared here}}
@end
- at implementation J @end // expected-warning {{incomplete implementation}}
+ at implementation J @end // expected-warning {{method definition for 'PMeth' not found}}
// Test3
@interface K : super <P>
Modified: cfe/trunk/test/SemaObjC/property-in-class-extension.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-in-class-extension.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-in-class-extension.m (original)
+++ cfe/trunk/test/SemaObjC/property-in-class-extension.m Tue Mar 26 19:02:21 2013
@@ -37,11 +37,12 @@ void FUNC () {
@interface rdar8747333 ()
- (NSObject *)bam;
-- (NSObject *)warn; // expected-note {{method definition for 'warn' not found}}
-- (void)setWarn : (NSObject *)val; // expected-note {{method definition for 'setWarn:' not found}}
+- (NSObject *)warn; // expected-note {{method 'warn' declared here}}
+- (void)setWarn : (NSObject *)val; // expected-note {{method 'setWarn:' declared here}}
@end
- at implementation rdar8747333 // expected-warning {{incomplete implementation}}
+ at implementation rdar8747333 // expected-warning {{method definition for 'warn' not found}} \
+ // expected-warning {{method definition for 'setWarn:' not found}}
@synthesize bar = _bar;
@synthesize baz = _baz;
@synthesize bam = _bam;
Modified: cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m (original)
+++ cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m Tue Mar 26 19:02:21 2013
@@ -28,10 +28,7 @@
// expected-note 2 {{required for direct or indirect protocol 'P2'}}
@end
- at implementation INTF // expected-warning {{incomplete implementation}} \
- // expected-warning 9 {{in protocol not implemented}}
+ at implementation INTF // expected-warning 9 {{in protocol not implemented}}
- (void) DefP1proto{}
-
+ (void) DefClsP3Proto{}
-
@end
Modified: cfe/trunk/test/SemaObjC/warning-missing-selector-name.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warning-missing-selector-name.m?rev=178097&r1=178096&r2=178097&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/warning-missing-selector-name.m (original)
+++ cfe/trunk/test/SemaObjC/warning-missing-selector-name.m Tue Mar 26 19:02:21 2013
@@ -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}} \
// 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 {{method definition for 'method::' not found}}
+ // expected-note {{method 'method::' declared here}}
@end
- at implementation INTF // expected-warning {{incomplete implementation}}
+ at implementation INTF // expected-warning {{method definition for 'method::' not found}}
-(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}} \
// expected-note {{introduce a parameter name to make 'Name2' part of the selector}} \
More information about the cfe-commits
mailing list