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).
45 lines
992 B
C++
45 lines
992 B
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux -emit-module-interface %t/a.cppm -o %t/A.pcm
|
|
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux -emit-module-interface -fprebuilt-module-path=%t %t/b.cppm -o %t/B.pcm
|
|
|
|
// Just check that this doesn't crash.
|
|
|
|
//--- a.cppm
|
|
module;
|
|
|
|
template <typename _Visitor>
|
|
void __do_visit(_Visitor &&__visitor) {
|
|
using _V0 = int;
|
|
[](_V0 __v) -> _V0 { return __v; } (1);
|
|
}
|
|
|
|
export module A;
|
|
|
|
void g() {
|
|
struct Visitor { };
|
|
__do_visit(Visitor());
|
|
}
|
|
|
|
//--- b.cppm
|
|
module;
|
|
|
|
template <typename _Visitor>
|
|
void __do_visit(_Visitor &&__visitor) {
|
|
using _V0 = int;
|
|
|
|
// Check that we instantiate this lambda's call operator in 'f' below
|
|
// instead of the one in 'a.cppm' here; otherwise, we won't find a
|
|
// corresponding instantiation of the using declaration above.
|
|
[](_V0 __v) -> _V0 { return __v; } (1);
|
|
}
|
|
|
|
export module B;
|
|
import A;
|
|
|
|
void f() {
|
|
__do_visit(1);
|
|
}
|