cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
79 lines
2.2 KiB
Objective-C
79 lines
2.2 KiB
Objective-C
// RUN: %clang_cc1 -triple=x86_64-apple-macos10.10 -fsyntax-only -Wdeprecated-implementations -verify -Wno-objc-root-class %s
|
|
|
|
@protocol P
|
|
- (void) D __attribute__((deprecated)); // expected-note {{method 'D' declared here}}
|
|
|
|
- (void) unavailable __attribute__((__unavailable__)); // expected-note {{method 'unavailable' declared here}}
|
|
@end
|
|
|
|
@interface A <P>
|
|
+ (void)F __attribute__((deprecated));
|
|
@end
|
|
|
|
@interface A()
|
|
- (void) E __attribute__((deprecated));
|
|
@end
|
|
|
|
@implementation A
|
|
+ (void)F { } // No warning, implementing its own deprecated method
|
|
- (void) D {} // expected-warning {{implementing deprecated method}}
|
|
- (void) E {} // No warning, implementing deprecated method in its class extension.
|
|
|
|
- (void) unavailable { } // expected-warning {{implementing unavailable metho}}
|
|
@end
|
|
|
|
@interface A(CAT)
|
|
- (void) G __attribute__((deprecated));
|
|
@end
|
|
|
|
@implementation A(CAT)
|
|
- (void) G {} // No warning, implementing its own deprecated method
|
|
@end
|
|
|
|
__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 {{implementing deprecated category}}
|
|
@end
|
|
|
|
@interface CL_SUB : CL // expected-warning {{'CL' is deprecated}}
|
|
@end
|
|
|
|
@interface BASE
|
|
- (void) B __attribute__((deprecated)); // expected-note {{method 'B' declared here}}
|
|
|
|
+ (void) unavailable __attribute__((availability(macos, unavailable))); // expected-note {{method 'unavailable' declared here}}
|
|
@end
|
|
|
|
@interface SUB : BASE
|
|
@end
|
|
|
|
@implementation SUB
|
|
- (void) B {} // expected-warning {{implementing deprecated method}}
|
|
+ (void) unavailable { } // expected-warning {{implementing unavailable method}}
|
|
@end
|
|
|
|
@interface Test
|
|
@end
|
|
|
|
@interface Test()
|
|
- (id)initSpecialInPrivateHeader __attribute__((deprecated));
|
|
@end
|
|
|
|
@implementation Test
|
|
- (id)initSpecialInPrivateHeader {
|
|
return (void *)0;
|
|
}
|
|
@end
|
|
|
|
__attribute__((deprecated))
|
|
@interface Test(DeprecatedCategory) // expected-note {{category declared here}}
|
|
@end
|
|
|
|
@implementation Test(DeprecatedCategory) // expected-warning {{implementing deprecated category}}
|
|
@end
|