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).
122 lines
2.6 KiB
Objective-C
122 lines
2.6 KiB
Objective-C
// RUN: c-index-test -single-file-parse %s | FileCheck %s
|
|
|
|
#include <stdint.h>
|
|
|
|
// CHECK-NOT: TypedefDecl=intptr_t
|
|
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=MyCls
|
|
@interface MyCls
|
|
// CHECK: [[@LINE+1]]:8: ObjCInstanceMethodDecl=some_meth
|
|
-(void)some_meth;
|
|
@end
|
|
|
|
#if 1
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test1
|
|
@interface Test1 @end
|
|
#else
|
|
// CHECK-NOT: [[@LINE+1]]:12:
|
|
@interface Test2 @end
|
|
#endif
|
|
|
|
#if 0
|
|
// CHECK-NOT: [[@LINE+1]]:12:
|
|
@interface Test3 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test4
|
|
@interface Test4 @end
|
|
#endif
|
|
|
|
#if SOMETHING_NOT_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test5
|
|
@interface Test5 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test6
|
|
@interface Test6 @end
|
|
#endif
|
|
|
|
#define SOMETHING_DEFINED 1
|
|
#if SOMETHING_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test7
|
|
@interface Test7 @end
|
|
#else
|
|
// CHECK-NOT: [[@LINE+1]]:12:
|
|
@interface Test8 @end
|
|
#endif
|
|
|
|
#if defined(SOMETHING_NOT_DEFINED)
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test9
|
|
@interface Test9 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test10
|
|
@interface Test10 @end
|
|
#endif
|
|
|
|
#if defined(SOMETHING_DEFINED)
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test11
|
|
@interface Test11 @end
|
|
#else
|
|
// CHECK-NOT: [[@LINE+1]]:12:
|
|
@interface Test12 @end
|
|
#endif
|
|
|
|
#if SOMETHING_NOT_DEFINED1
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test13
|
|
@interface Test13 @end
|
|
#elif SOMETHING_NOT_DEFINED2
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test14
|
|
@interface Test14 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test15
|
|
@interface Test15 @end
|
|
#endif
|
|
|
|
#ifdef SOMETHING_NOT_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test19
|
|
@interface Test19 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test20
|
|
@interface Test20 @end
|
|
#endif
|
|
|
|
#ifdef SOMETHING_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test21
|
|
@interface Test21 @end
|
|
#else
|
|
// CHECK-NOT: [[@LINE+1]]:12:
|
|
@interface Test22 @end
|
|
#endif
|
|
|
|
#ifndef SOMETHING_NOT_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test23
|
|
@interface Test23 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test24
|
|
@interface Test24 @end
|
|
#endif
|
|
|
|
#ifndef SOMETHING_DEFINED
|
|
// CHECK-NOT: [[@LINE+1]]:12:
|
|
@interface Test25 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test26
|
|
@interface Test26 @end
|
|
#endif
|
|
|
|
#if 1 < SOMETHING_NOT_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test27
|
|
@interface Test27 @end
|
|
#else
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test28
|
|
@interface Test28 @end
|
|
#endif
|
|
|
|
#if SOMETHING_NOT_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test29
|
|
@interface Test29 @end
|
|
#endif
|
|
|
|
#ifdef SOMETHING_NOT_DEFINED
|
|
// CHECK: [[@LINE+1]]:12: ObjCInterfaceDecl=Test30
|
|
@interface Test30 @end
|
|
#endif
|