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).
33 lines
506 B
C++
33 lines
506 B
C++
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
|
|
|
|
struct A {
|
|
A() { x = 10; }
|
|
int x;
|
|
};
|
|
|
|
const A x;
|
|
|
|
// CHECK: @_ZL1x = internal global
|
|
|
|
struct X {
|
|
int (*fp)(int, int);
|
|
};
|
|
|
|
int add(int x, int y) { return x + y; }
|
|
|
|
// CHECK: @x2 = {{(dso_local )?}}constant
|
|
extern const X x2;
|
|
const X x2 = { &add };
|
|
|
|
struct X1 {
|
|
mutable int i;
|
|
};
|
|
|
|
struct X2 {
|
|
X1 array[3];
|
|
};
|
|
|
|
// CHECK: @x2b = {{(dso_local )?}}global
|
|
extern const X2 x2b;
|
|
const X2 x2b = { { { 1 }, { 2 }, { 3 } } };
|