These diagnostics can't be disabled, and can't actually catch any bugs.
rdar://
32427296
Differential revision: https://reviews.llvm.org/D33661
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304306
91177308-0d34-0410-b5e6-
96231b3b80d8
// FIXME: PushOnScopeChains?
CurContext->addDecl(CDecl);
- // If the interface is deprecated/unavailable, warn/error about it.
- if (IDecl)
- DiagnoseUseOfDecl(IDecl, ClassLoc);
-
// If the interface has the objc_runtime_visible attribute, we
// cannot implement a category for it.
if (IDecl && IDecl->hasAttr<ObjCRuntimeVisibleAttr>()) {
}
-__attribute ((deprecated)) // expected-note 2 {{'DEPRECATED' has been explicitly marked deprecated here}}
+__attribute ((deprecated)) // expected-note {{'DEPRECATED' has been explicitly marked deprecated here}}
@interface DEPRECATED {
@public int ivar;
DEPRECATED *ivar2; // no warning.
@end
@interface DEPRECATED (Category2) // no warning.
+- (id)meth;
@end
-@implementation DEPRECATED (Category2) // expected-warning {{'DEPRECATED' is deprecated}}
+__attribute__((deprecated))
+void depr_function();
+
+@implementation DEPRECATED (Category2) // no warning
+- (id)meth {
+ depr_function(); // no warning.
+ return 0;
+}
@end
@interface NS : DEPRECATED // expected-warning {{'DEPRECATED' is deprecated}}
// rdar://9092208
__attribute__((unavailable("not available")))
-@interface MyClass { // expected-note 8 {{'MyClass' has been explicitly marked unavailable here}}
+@interface MyClass { // expected-note 7 {{'MyClass' has been explicitly marked unavailable here}}
@public
void *_test;
MyClass *ivar; // no error.
@interface MyClass (Cat2) // no error.
@end
-@implementation MyClass (Cat2) // expected-error {{unavailable}}
+@implementation MyClass (Cat2) // no error.
@end
int main() {
- (void) G {} // No warning, implementing its own deprecated method
@end
-__attribute__((deprecated)) // expected-note 2 {{'CL' has been explicitly marked deprecated here}}
+__attribute__((deprecated)) // expected-note {{'CL' has been explicitly marked deprecated here}}
@interface CL // expected-note 2 {{class declared here}}
@end
@implementation CL // expected-warning {{Implementing deprecated class}}
@end
-@implementation CL ( SomeCategory ) // expected-warning {{'CL' is deprecated}} \
- // expected-warning {{Implementing deprecated category}}
+@implementation CL (SomeCategory) // expected-warning {{Implementing deprecated category}}
@end
@interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}