summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-12-27 01:05:55 +0000
committerNico Weber <nicolasweber@gmx.de>2014-12-27 01:05:55 +0000
commit1813ec797d75bddffefb472a049424a7e548e8ff (patch)
tree0a85acf8d37a1182f8691fc6d6d291e98cb1fa08 /clang/test/SemaObjC
parent47beb8ace0d8942e727c24e897140b45a4639565 (diff)
downloadbcm5719-llvm-1813ec797d75bddffefb472a049424a7e548e8ff.tar.gz
bcm5719-llvm-1813ec797d75bddffefb472a049424a7e548e8ff.zip
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. llvm-svn: 224873
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/attr-deprecated.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/attr-deprecated.m b/clang/test/SemaObjC/attr-deprecated.m
index 4d54d5da057..02acf2ced22 100644
--- a/clang/test/SemaObjC/attr-deprecated.m
+++ b/clang/test/SemaObjC/attr-deprecated.m
@@ -258,3 +258,14 @@ const char * func() {
}
@end
+@implementation UndeclaredImpl // expected-warning{{cannot find interface declaration}}
+- (void)partiallyUnavailableMethod {}
+@end
+
+@interface InterfaceWithSameMethodAsUndeclaredImpl
+- (void)partiallyUnavailableMethod __attribute__((unavailable));
+@end
+
+void f(id a) {
+ [a partiallyUnavailableMethod]; // no warning, `a` could be an UndeclaredImpl.
+}
OpenPOWER on IntegriCloud