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).
31 lines
923 B
LLVM
31 lines
923 B
LLVM
; RUN: not llvm-as -disable-output %s 2>&1 | FileCheck %s
|
|
|
|
; CHECK: Attribute 'writable' applied to incompatible type!
|
|
; CHECK-NEXT: ptr @not_pointer
|
|
define void @not_pointer_writable(i32 writable %arg) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Attributes writable and readnone are incompatible!
|
|
; CHECK-NEXT: ptr @writable_readnone
|
|
define void @writable_readnone(ptr writable readnone %arg) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Attributes writable and readonly are incompatible!
|
|
; CHECK-NEXT: ptr @writable_readonly
|
|
define void @writable_readonly(ptr writable readonly %arg) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: Attribute writable and memory without argmem: write are incompatible!
|
|
; CHECK-NEXT: ptr @writable_memory_argmem_read
|
|
define void @writable_memory_argmem_read(ptr writable %arg) memory(write, argmem: read) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK-NOT: incompatible
|
|
define void @writable_memory_argmem_write(ptr writable %arg) memory(read, argmem: write) {
|
|
ret void
|
|
}
|