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).
36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=1
|
|
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple %itanium_abi_triple -verify %s -DN=2
|
|
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple arm64-apple-ios -fptrauth-intrinsics -verify %s -DN=3
|
|
// RUN: %clang_cc1 -emit-llvm-only -x c++ -std=c++11 -triple aarch64-linux-gnu -fptrauth-intrinsics -verify %s -DN=3
|
|
|
|
struct A { int a; };
|
|
|
|
#if N == 1
|
|
// ChooseExpr
|
|
template<class T> void test(int (&)[sizeof(__builtin_choose_expr(true, 1, 1), T())]) {} // expected-error {{cannot yet mangle}}
|
|
template void test<int>(int (&)[sizeof(int)]);
|
|
|
|
#elif N == 2
|
|
// CompoundLiteralExpr
|
|
template<class T> void test(int (&)[sizeof((A){}, T())]) {} // expected-error {{cannot yet mangle}}
|
|
template void test<int>(int (&)[sizeof(A)]);
|
|
|
|
#elif N == 3
|
|
// __builtin_ptrauth_type_discriminator
|
|
template <class T, unsigned disc>
|
|
struct S1 {};
|
|
|
|
template<class T>
|
|
void func(S1<T, __builtin_ptrauth_type_discriminator(T)> s1) { // expected-error {{cannot yet mangle __builtin_ptrauth_type_discriminator expression}}
|
|
}
|
|
|
|
void testfunc1() {
|
|
func(S1<int(), __builtin_ptrauth_type_discriminator(int())>());
|
|
}
|
|
|
|
// FIXME: There are several more cases we can't yet mangle.
|
|
|
|
#else
|
|
#error unknown N
|
|
#endif
|