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).
42 lines
1.5 KiB
C
42 lines
1.5 KiB
C
// RUN: %clang_cc1 %s -fopenacc -verify
|
|
|
|
struct NotConvertible{} NC;
|
|
short getS();
|
|
int getI();
|
|
|
|
void uses() {
|
|
int arr[5];
|
|
|
|
#pragma acc data copyin(arr[0]) wait
|
|
;
|
|
|
|
#pragma acc enter data copyin(arr[0]) wait
|
|
|
|
#pragma acc exit data copyout(arr[0]) wait(getS(), getI())
|
|
|
|
// expected-error@+1{{OpenACC 'wait' clause is not valid on 'host_data' directive}}
|
|
#pragma acc host_data use_device(arr) wait(getS(), getI())
|
|
;
|
|
|
|
#pragma acc data copyin(arr[0]) wait(devnum:getS(): getI())
|
|
;
|
|
|
|
#pragma acc enter data copyin(arr[0]) wait(devnum:getS(): queues: getI()) wait(devnum:getI(): queues: getS(), getI(), 5)
|
|
|
|
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('struct NotConvertible' invalid)}}
|
|
#pragma acc exit data copyout(arr[0]) wait(devnum:NC : 5)
|
|
|
|
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('struct NotConvertible' invalid)}}
|
|
#pragma acc data copyin(arr[0]) wait(devnum:5 : NC)
|
|
;
|
|
|
|
// expected-error@+3{{OpenACC clause 'wait' requires expression of integer type ('int[5]' invalid)}}
|
|
// expected-error@+2{{OpenACC clause 'wait' requires expression of integer type ('int[5]' invalid)}}
|
|
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('struct NotConvertible' invalid)}}
|
|
#pragma acc enter data copyin(arr[0]) wait(devnum:arr : queues: arr, NC, 5)
|
|
|
|
// expected-error@+1{{OpenACC 'wait' clause is not valid on 'loop' directive}}
|
|
#pragma acc loop wait
|
|
for(int i = 5; i < 10;++i);
|
|
}
|