r224873 - Add more test coverage for the Objective-C deprected selector warning.

Nico Weber nicolasweber at gmx.de
Fri Dec 26 17:05:56 PST 2014


Author: nico
Date: Fri Dec 26 19:05:55 2014
New Revision: 224873

URL: http://llvm.org/viewvc/llvm-project?rev=224873&view=rev
Log:
Add more test coverage for the Objective-C deprected selector warning.

I broke this case in a local patch I'm writing, and there was no test to stop
me.  Now there is.

Modified:
    cfe/trunk/test/SemaObjC/attr-deprecated.m

Modified: cfe/trunk/test/SemaObjC/attr-deprecated.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/attr-deprecated.m?rev=224873&r1=224872&r2=224873&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/attr-deprecated.m (original)
+++ cfe/trunk/test/SemaObjC/attr-deprecated.m Fri Dec 26 19:05:55 2014
@@ -258,3 +258,14 @@ const char * func() {
 }
 @end
 
+ at implementation UndeclaredImpl // expected-warning{{cannot find interface declaration}}
+- (void)partiallyUnavailableMethod {}
+ at end
+
+ at interface InterfaceWithSameMethodAsUndeclaredImpl
+- (void)partiallyUnavailableMethod __attribute__((unavailable));
+ at end
+
+void f(id a) {
+  [a partiallyUnavailableMethod]; // no warning, `a` could be an UndeclaredImpl.
+}





More information about the cfe-commits mailing list