[cfe-commits] r151579 - in /cfe/trunk: include/clang/Basic/ lib/Sema/ test/Analysis/ test/SemaObjC/

Ted Kremenek kremenek at apple.com
Mon Feb 27 14:55:11 PST 2012


Author: kremenek
Date: Mon Feb 27 16:55:11 2012
New Revision: 151579

URL: http://llvm.org/viewvc/llvm-project?rev=151579&view=rev
Log:
After numerous requests, have Objective-C 'method declared here' notes mention the actual method.  This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning.  Fixes radar 10914035.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp
    cfe/trunk/lib/Sema/SemaExprObjC.cpp
    cfe/trunk/test/Analysis/method-arg-decay.m
    cfe/trunk/test/SemaObjC/arc-peformselector.m
    cfe/trunk/test/SemaObjC/arc.m
    cfe/trunk/test/SemaObjC/category-1.m
    cfe/trunk/test/SemaObjC/class-message-protocol-lookup.m
    cfe/trunk/test/SemaObjC/compare-qualified-id.m
    cfe/trunk/test/SemaObjC/incomplete-implementation.m
    cfe/trunk/test/SemaObjC/method-attributes.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/protocol-implementing-class-methods.m
    cfe/trunk/test/SemaObjC/related-result-type-inference.m
    cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m
    cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Feb 27 16:55:11 2012
@@ -538,7 +538,7 @@
   "multiple methods named %0 found">, InGroup<StrictSelector>, DefaultIgnore;
 def warn_accessor_property_type_mismatch : Warning<
   "type of property %0 does not match type of accessor %1">;
-def note_method_declared_at : Note<"method declared here">;
+def note_method_declared_at : Note<"method %0 declared here">;
 def err_setter_type_void : Error<"type of setter must be void">;
 def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
 def warn_duplicate_method_decl : 
@@ -679,7 +679,7 @@
 def warn_unimplemented_selector:  Warning<
   "unimplemented selector %0">, InGroup<Selector>, DefaultIgnore;
 def warn_unimplemented_protocol_method : Warning<
-  "method in protocol not implemented">, InGroup<Protocol>;
+  "method %0 in protocol not implemented">, InGroup<Protocol>;
 
 // C++ declarations
 def err_static_assert_expression_is_not_constant : Error<

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Feb 27 16:55:11 2012
@@ -242,7 +242,8 @@
   if (ND && ND->isDeprecated()) {
     S.Diag(ImplLoc, diag::warn_deprecated_def) << select;
     if (select == 0)
-      S.Diag(ND->getLocation(), diag::note_method_declared_at);
+      S.Diag(ND->getLocation(), diag::note_method_declared_at)
+        << ND->getDeclName();
     else
       S.Diag(ND->getLocation(), diag::note_previous_decl) << "class";
   }
@@ -1466,7 +1467,8 @@
   if (match) {
     Diag(ImpMethodDecl->getLocation(), 
          diag::warn_category_method_impl_match);
-    Diag(MethodDecl->getLocation(), diag::note_method_declared_at);
+    Diag(MethodDecl->getLocation(), diag::note_method_declared_at)
+      << MethodDecl->getDeclName();
   }
 }
 
@@ -1539,7 +1541,8 @@
             if (Diags.getDiagnosticLevel(DIAG, ImpLoc)
                 != DiagnosticsEngine::Ignored) {
               WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG);
-              Diag(method->getLocation(), diag::note_method_declared_at);
+              Diag(method->getLocation(), diag::note_method_declared_at)
+                << method->getDeclName();
               Diag(CDecl->getLocation(), diag::note_required_for_protocol_at)
                 << PDecl->getDeclName();
             }
@@ -1561,7 +1564,8 @@
       if (Diags.getDiagnosticLevel(DIAG, ImpLoc) !=
             DiagnosticsEngine::Ignored) {
         WarnUndefinedMethod(ImpLoc, method, IncompleteImpl, DIAG);
-        Diag(method->getLocation(), diag::note_method_declared_at);
+        Diag(method->getLocation(), diag::note_method_declared_at)
+          << method->getDeclName();
         Diag(IDecl->getLocation(), diag::note_required_for_protocol_at) <<
           PDecl->getDeclName();
       }
@@ -2798,7 +2802,8 @@
       SourceLocation MethodLoc = IMD->getLocation();
       if (!getSourceManager().isInSystemHeader(MethodLoc)) {
         Diag(EndLoc, diag::warn_attribute_method_def);
-        Diag(MethodLoc, diag::note_method_declared_at);
+        Diag(MethodLoc, diag::note_method_declared_at)
+          << ObjCMethod->getDeclName();
       }
     }
   } else {

Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Mon Feb 27 16:55:11 2012
@@ -1306,7 +1306,8 @@
           if (Method) {
             Diag(Loc, diag::warn_instance_method_on_class_found)
               << Method->getSelector() << Sel;
-            Diag(Method->getLocation(), diag::note_method_declared_at);
+            Diag(Method->getLocation(), diag::note_method_declared_at)
+              << Method->getDeclName();
           }
         }
       } else {
@@ -1528,7 +1529,8 @@
                   // selector names a +1 method 
                   Diag(SelLoc, 
                        diag::err_arc_perform_selector_retains);
-                  Diag(SelMethod->getLocation(), diag::note_method_declared_at);
+                  Diag(SelMethod->getLocation(), diag::note_method_declared_at)
+                    << SelMethod->getDeclName();
                 }
                 break;
               default:
@@ -1537,7 +1539,8 @@
                   // selector names a +1 method
                   Diag(SelLoc, 
                        diag::err_arc_perform_selector_retains);
-                  Diag(SelMethod->getLocation(), diag::note_method_declared_at);
+                  Diag(SelMethod->getLocation(), diag::note_method_declared_at)
+                    << SelMethod->getDeclName();
                 }
                 break;
             }

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=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/method-arg-decay.m (original)
+++ cfe/trunk/test/Analysis/method-arg-decay.m Mon Feb 27 16:55:11 2012
@@ -56,7 +56,7 @@
 @interface PBXProjectModule : PBXModule <PBXFindableText> {
 }
 @end @class PBXBookmark;
- at protocol PBXSelectionTarget - (NSObject <PBXSelectionTarget> *) performAction:(id)action withSelection:(NSArray *)selection;  // expected-note {{method declared here}}
+ at protocol PBXSelectionTarget - (NSObject <PBXSelectionTarget> *) performAction:(id)action withSelection:(NSArray *)selection;  // expected-note {{method 'performAction:withSelection:' declared here}}
 @end @class XCPropertyDictionary, XCPropertyCondition, XCPropertyConditionSet, XCMutablePropertyConditionSet;
 extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExposedModulesOnly);
 @interface NSString (StringUtilities) - (NSString *) trimToLength:(NSInteger)length preserveRange:(NSRange)range;
@@ -72,8 +72,7 @@
 }
 - (PBXModule *) moduleForTab:(NSTabViewItem *)item; // expected-note {{method definition for 'moduleForTab:' not found}}
 @end  
- at implementation XCPerspectiveModule // expected-warning {{incomplete implementation}} \
-				    // expected-warning {{method in protocol not implemented}}
+ at implementation XCPerspectiveModule // expected-warning {{incomplete implementation}} 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/SemaObjC/arc-peformselector.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-peformselector.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-peformselector.m (original)
+++ cfe/trunk/test/SemaObjC/arc-peformselector.m Mon Feb 27 16:55:11 2012
@@ -2,12 +2,12 @@
 // rdar://9659270
 
 @interface NSObject
-- (id)copy; // expected-note {{method declared here}}
-- (id) test __attribute__((ns_returns_retained)); // expected-note {{method declared here}}
-+ (id) new ; // expected-note {{method declared here}}
+- (id)copy; // expected-note {{method 'copy' declared here}}
+- (id) test __attribute__((ns_returns_retained)); // expected-note {{method 'test' declared here}}
++ (id) new ; // expected-note {{method 'new' declared here}}
 - (id) init __attribute__((ns_returns_not_retained));
 - (id)PlusZero;
-- (id)PlusOne __attribute__((ns_returns_retained)); // expected-note {{method declared here}}
+- (id)PlusOne __attribute__((ns_returns_retained)); // expected-note {{method 'PlusOne' declared here}}
 @end
 
 @interface I : NSObject

Modified: cfe/trunk/test/SemaObjC/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc.m (original)
+++ cfe/trunk/test/SemaObjC/arc.m Mon Feb 27 16:55:11 2012
@@ -42,10 +42,10 @@
 // rdar://8843638
 
 @interface I
-- (id)retain; // expected-note {{method declared here}}
-- (id)autorelease; // expected-note {{method declared here}}
-- (oneway void)release; // expected-note {{method declared here}}
-- (NSUInteger)retainCount; // expected-note {{method declared here}}
+- (id)retain; // expected-note {{method 'retain' declared here}}
+- (id)autorelease; // expected-note {{method 'autorelease' declared here}}
+- (oneway void)release; // expected-note {{method 'release' declared here}}
+- (NSUInteger)retainCount; // expected-note {{method 'retainCount' declared here}}
 @end
 
 @implementation I

Modified: cfe/trunk/test/SemaObjC/category-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/category-1.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/category-1.m (original)
+++ cfe/trunk/test/SemaObjC/category-1.m Mon Feb 27 16:55:11 2012
@@ -62,7 +62,7 @@
 // <rdar://problem/7249233>
 
 @protocol MultipleCat_P
--(void) im0; // expected-note {{method declared here}}
+-(void) im0; // expected-note {{method 'im0' declared here}}
 @end
 
 @interface MultipleCat_I @end // expected-note {{required for direct or indirect protocol 'MultipleCat_P'}}
@@ -72,7 +72,7 @@
 @interface MultipleCat_I() <MultipleCat_P>  @end
 
 @implementation MultipleCat_I // expected-warning {{incomplete implementation}} \
-                              // expected-warning {{method in protocol not implemented}}
+                              // 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/class-message-protocol-lookup.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-message-protocol-lookup.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/class-message-protocol-lookup.m (original)
+++ cfe/trunk/test/SemaObjC/class-message-protocol-lookup.m Mon Feb 27 16:55:11 2012
@@ -13,7 +13,7 @@
 
 @protocol Test2Protocol
 + (id)alloc;
-- (id)alloc2; // expected-note 2 {{method declared here}}
+- (id)alloc2; // expected-note 2 {{method 'alloc2' declared here}}
 @end
 
 @implementation RandomObject

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=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/compare-qualified-id.m (original)
+++ cfe/trunk/test/SemaObjC/compare-qualified-id.m Mon Feb 27 16:55:11 2012
@@ -5,7 +5,7 @@
 typedef struct _NSZone NSZone;
 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
 @protocol NSObject  - (BOOL)isEqual:(id)object; @end
- at protocol NSCopying  - (id)copyWithZone:(NSZone *)zone; @end // expected-note {{method declared here}}
+ at protocol NSCopying  - (id)copyWithZone:(NSZone *)zone; @end // expected-note {{method 'copyWithZone:' declared here}}
 @protocol NSMutableCopying  - (id)mutableCopyWithZone:(NSZone *)zone; @end
 @protocol NSCoding  - (void)encodeWithCoder:(NSCoder *)aCoder; @end
 @interface NSObject <NSObject> {} @end
@@ -24,7 +24,7 @@
 @end
 
 @implementation XCPropertyExpansionContext // expected-warning {{incomplete implementation}} \
-					   // expected-warning {{method in protocol not implemented}}
+					   // 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/incomplete-implementation.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/incomplete-implementation.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/incomplete-implementation.m (original)
+++ cfe/trunk/test/SemaObjC/incomplete-implementation.m Mon Feb 27 16:55:11 2012
@@ -2,7 +2,7 @@
 
 @interface I
 - Meth; // expected-note{{method definition for 'Meth' not found}} \
-        // expected-note{{method declared here}}
+        // expected-note{{method 'Meth' declared here}}
 @end
 
 @implementation  I  // expected-warning{{incomplete implementation}}
@@ -14,7 +14,7 @@
 
 #pragma GCC diagnostic ignored "-Wincomplete-implementation"
 @interface I2
-- Meth; // expected-note{{method declared here}}
+- Meth; // expected-note{{method 'Meth' declared here}}
 @end
 
 @implementation  I2

Modified: cfe/trunk/test/SemaObjC/method-attributes.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-attributes.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-attributes.m (original)
+++ cfe/trunk/test/SemaObjC/method-attributes.m Mon Feb 27 16:55:11 2012
@@ -13,9 +13,9 @@
 @interface INTF
 - (int) foo1: (int)arg1 __attribute__((deprecated));
 
-- (int) foo: (int)arg1;  // expected-note {{method declared here}}
+- (int) foo: (int)arg1;  // expected-note {{method 'foo:' declared here}}
 
-- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{method declared here}}
+- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{method 'foo2:' declared here}}
 - (int) foo3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) __attribute__((ns_consumes_self));
 @end
 
@@ -39,7 +39,7 @@
 
 @interface Foo 
 - (void)doSomething1:(id)sender;
-- (void)doSomething2:(id)sender; // expected-note {{method declared here}}
+- (void)doSomething2:(id)sender; // expected-note {{method 'doSomething2:' declared here}}
 @end
 
 @implementation Foo

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=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-undef-category-warn-1.m Mon Feb 27 16:55:11 2012
@@ -4,8 +4,8 @@
 @end
 
 @protocol P
-- (void) Pmeth;	  // expected-note {{method declared here}}
-- (void) Pmeth1;    // expected-note {{method 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'}}
@@ -13,7 +13,7 @@
 @end
 
 @implementation MyClass1(CAT) // expected-warning {{incomplete implementation}}  \
-				// expected-warning {{method in protocol not implemented}}
+				// expected-warning {{method 'Pmeth' in protocol not implemented}}
 - (void) Pmeth1{}
 @end
 
@@ -22,7 +22,7 @@
 @end
 
 @implementation MyClass1(DOG) // expected-warning {{incomplete implementation}} \
-		// expected-warning {{method in protocol not implemented}}
+		// expected-warning {{method 'Pmeth1' in protocol not implemented}}
 - (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=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m (original)
+++ cfe/trunk/test/SemaObjC/method-undef-extension-warn-1.m Mon Feb 27 16:55:11 2012
@@ -5,7 +5,7 @@
 
 @protocol P
 - (void)Pmeth;
-- (void)Pmeth1; // expected-note {{method declared here}}
+- (void)Pmeth1; // expected-note {{method 'Pmeth1' declared here}}
 @end
 
 // Class extension
@@ -19,6 +19,6 @@
 @end
 
 @implementation MyClass // expected-warning {{incomplete implementation}}  \
-			// expected-warning {{method in protocol not implemented}}
+			// expected-warning {{method 'Pmeth1' in protocol not implemented}}
 - (void)Pmeth {}
 @end

Modified: cfe/trunk/test/SemaObjC/protocol-implementing-class-methods.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-implementing-class-methods.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/protocol-implementing-class-methods.m (original)
+++ cfe/trunk/test/SemaObjC/protocol-implementing-class-methods.m Mon Feb 27 16:55:11 2012
@@ -5,11 +5,11 @@
 @optional
 - (int) PMeth;
 @required
-- (void) : (double) arg; // expected-note {{method declared here}}
+- (void) : (double) arg; // expected-note {{method ':' declared here}}
 @end
 
 @interface NSImage <P1>
-- (void) initialize; // expected-note {{method declared here}}
+- (void) initialize; // expected-note {{method 'initialize' declared here}}
 @end
 
 @interface NSImage (AirPortUI)
@@ -17,7 +17,7 @@
 @end
 
 @interface NSImage()
-- (void) CEMeth; // expected-note {{method declared here}}
+- (void) CEMeth; // expected-note {{method 'CEMeth' declared here}}
 @end
 
 @implementation NSImage (AirPortUI)

Modified: cfe/trunk/test/SemaObjC/related-result-type-inference.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/related-result-type-inference.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/related-result-type-inference.m (original)
+++ cfe/trunk/test/SemaObjC/related-result-type-inference.m Mon Feb 27 16:55:11 2012
@@ -150,7 +150,7 @@
 
 // <rdar://problem/9340699>
 @interface G 
-- (id)_ABC_init __attribute__((objc_method_family(init))); // expected-note {{method declared here}}
+- (id)_ABC_init __attribute__((objc_method_family(init))); // expected-note {{method '_ABC_init' declared here}}
 @end
 
 @interface G (Additions)

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=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m (original)
+++ cfe/trunk/test/SemaObjC/undef-protocol-methods-1.m Mon Feb 27 16:55:11 2012
@@ -1,25 +1,25 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
 @protocol P1
-- (void) P1proto;  // expected-note {{method declared here}}
-+ (void) ClsP1Proto;    // expected-note {{method declared here}}
+- (void) P1proto;  // expected-note {{method 'P1proto' declared here}}
++ (void) ClsP1Proto;    // expected-note {{method 'ClsP1Proto' declared here}}
 - (void) DefP1proto;
 @end
 @protocol P2
-- (void) P2proto;   // expected-note {{method declared here}}
-+ (void) ClsP2Proto;  // expected-note {{method declared here}}
+- (void) P2proto;   // expected-note {{method 'P2proto' declared here}}
++ (void) ClsP2Proto;  // expected-note {{method 'ClsP2Proto' declared here}}
 @end
 
 @protocol P3<P2>
-- (void) P3proto;   // expected-note {{method declared here}}
-+ (void) ClsP3Proto;   // expected-note {{method declared here}}
+- (void) P3proto;   // expected-note {{method 'P3proto' declared here}}
++ (void) ClsP3Proto;   // expected-note {{method 'ClsP3Proto' declared here}}
 + (void) DefClsP3Proto;
 @end
 
 @protocol PROTO<P1, P3>
-- (void) meth;		  // expected-note {{method declared here}}
-- (void) meth : (int) arg1;   // expected-note {{method declared here}}
-+ (void) cls_meth : (int) arg1;   // expected-note {{method declared here}}
+- (void) meth;		  // expected-note {{method 'meth' declared here}}
+- (void) meth : (int) arg1;   // expected-note {{method 'meth:' declared here}}
++ (void) cls_meth : (int) arg1;   // expected-note {{method 'cls_meth:' declared here}}
 @end
 
 @interface INTF <PROTO> // expected-note 3 {{required for direct or indirect protocol 'PROTO'}} \
@@ -29,7 +29,7 @@
 @end
 
 @implementation INTF   // expected-warning {{incomplete implementation}} \
-                       // expected-warning 9 {{method in protocol not implemented}}
+                       // expected-warning 9 {{in protocol not implemented}}
 - (void) DefP1proto{}
 
 + (void) DefClsP3Proto{}

Modified: cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m?rev=151579&r1=151578&r2=151579&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m (original)
+++ cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m Mon Feb 27 16:55:11 2012
@@ -2,15 +2,15 @@
 // rdar://8973810
 
 @protocol P
-- (void) D __attribute__((deprecated)); // expected-note {{method declared here}}
+- (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}}
 @end
 
 @interface A <P>
-+ (void)F __attribute__((deprecated)); // expected-note {{method declared here}}
++ (void)F __attribute__((deprecated)); // expected-note {{method 'F' declared here}}
 @end
 
 @interface A()
-- (void) E __attribute__((deprecated)); // expected-note {{method declared here}}
+- (void) E __attribute__((deprecated)); // expected-note {{method 'E' declared here}}
 @end
 
 @implementation A
@@ -34,7 +34,7 @@
 @end
 
 @interface BASE
-- (void) B __attribute__((deprecated)); // expected-note {{method declared here}}
+- (void) B __attribute__((deprecated)); // expected-note {{method 'B' declared here}}
 @end
 
 @interface SUB : BASE





More information about the cfe-commits mailing list