Files
RedBear-OS/local/recipes/dev/libclc/source/clang/test/SemaObjC/interface-scope-2.m
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
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).
2026-08-01 05:13:02 +03:00

127 lines
3.3 KiB
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -Wno-objc-root-class %s
// expected-no-diagnostics
// FIXME: must also compile as Objective-C++
typedef struct objc_selector *SEL;
typedef signed char BOOL;
typedef unsigned int NSUInteger;
typedef struct _NSZone NSZone;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
@protocol NSObject
- (BOOL)isEqual:(id)object;
- (BOOL)respondsToSelector:(SEL)aSelector;
@end
@protocol NSCopying
- (id)copyWithZone:(NSZone *)zone;
@end
@protocol NSMutableCopying
- (id)mutableCopyWithZone:(NSZone *)zone;
@end
@protocol NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder;
@end
@interface NSObject <NSObject> {}
@end
@class NSString, NSData;
typedef struct _NSPoint {}
NSRange;
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
- (NSUInteger)length;
@end
@interface NSMutableString : NSString
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;
@end
@class NSArray, NSDictionary, NSMapTable;
@interface NSResponder : NSObject <NSCoding> {}
@end
@protocol NSAnimatablePropertyContainer
- (id)animator;
@end
extern NSString *NSAnimationTriggerOrderIn ;
@interface NSView : NSResponder <NSAnimatablePropertyContainer> {
struct __VFlags2 {} _vFlags2;
}
@end
@class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
@interface FooiagramView : NSView {
id _delegate;
}
@end
@class FooiagramView;
@interface _FooiagramViewReserved : NSObject {
@public
NSMutableString *_typeToSelectString;
struct _FooiagramViewFlags {
unsigned int delegateRespondsToPrintInfoForBarView : 1;
} _dvFlags;
}
@end
extern _FooiagramViewReserved *_FooiagramViewBarViewReserved(FooiagramView *BarView);
@interface FooiagramView (FooiagramViewPrivate)
+ (Class)_defaultBarToolManagerClass;
@end
@implementation FooiagramView
static NSMapTable *_defaultMenuForClass = 0;
- (void)setDelegate:(id)delegate {
if (_delegate != delegate) {
struct _FooiagramViewFlags *dvFlags =
&_FooiagramViewBarViewReserved(self)->_dvFlags;
if (_delegate != ((void *)0)) {
dvFlags->delegateRespondsToPrintInfoForBarView = [_delegate respondsToSelector:@selector(printInfoForBarView:)];
}
}
}
@end
@interface WizKing_MIKeep {
struct __LoreStuffNode *_historyStuff;
}
@end
typedef struct __LoreStuffNode {} LoreStuffNode;
@implementation WizKing_MIKeep
- init {
LoreStuffNode *node;
node = &(_historyStuff[1]);
return 0;
}
@end
typedef long unsigned int __darwin_size_t;
typedef __darwin_size_t size_t;
void *memset(void *, int, size_t);
@class NSString, NSURL, NSError;
@interface OingoWerdnaPeon : NSObject {}
@end typedef enum {
OingoPT_SmashOK, OingoPT_NoSuchFile, }
OingoWerdnaPeonIOMethod;
@interface OingoWerdnaPeonSmashDrivel : NSObject <NSCopying> {}
@end
@interface OingoBoingoContraptionPeon : OingoWerdnaPeon {
struct _OingoBoingoContraptionPeonFlags {}
_nfttFlags;
}
@end
@implementation OingoBoingoContraptionPeon
+ (void)initialize {}
- (id)initWithSmashDrivel:(OingoWerdnaPeonSmashDrivel *)info {
if (self != ((void *)0)) {
(void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));
}
return 0;
}
@end
@interface Blah {
struct X {
int x;
} value;
}
@end
@implementation Blah
- (int)getValue {
struct X *xp = &value;
return xp->x;
}
@end