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).
44 lines
1.4 KiB
C++
44 lines
1.4 KiB
C++
// RUN: %clang_cc1 -triple x86_64-gnu-linux -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// CHECK-LABEL: define{{.*}} void @{{.*}}test4{{.*}}(float
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: [[TMP2:%.*]] = alloca float, align 4
|
|
// CHECK-NEXT: store float [[TMP1:%.*]], ptr [[TMP2:%.*]], align 4
|
|
// CHECK-NEXT: ret void
|
|
|
|
// CHECK-LABEL: define{{.*}} void @{{.*}}test4{{.*}}(i32
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: [[TMP2:%.*]] = alloca i32, align 4
|
|
// CHECK-NEXT: store i32 [[TMP1:%.*]], ptr [[TMP2:%.*]], align 4
|
|
// CHECK-NEXT: ret void
|
|
|
|
// CHECK-LABEL: define{{.*}} void @{{.*}}test{{.*}}(
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: [[TMP1:%.*]] = alloca i32, align 4
|
|
// CHECK-NEXT: [[TMP2:%.*]] = alloca float, align 4
|
|
// CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP1:%.*]], align 4
|
|
// CHECK-NEXT: [[TMP4:%.*]] = freeze i32 [[TMP3:%.*]]
|
|
// CHECK-NEXT: call void @{{.*}}test4{{.*}}(i32 noundef [[TMP4:%.*]])
|
|
// CHECK-NEXT: [[TMP5:%.*]] = load float, ptr [[TMP2:%.*]], align 4
|
|
// CHECK-NEXT: [[TMP6:%.*]] = freeze float [[TMP5:%.*]]
|
|
// CHECK-NEXT: call void @{{.*}}test4{{.*}}(float noundef [[TMP6:%.*]])
|
|
// CHECK-NEXT: ret void
|
|
|
|
template<class T>
|
|
void test4(T __attribute__((maybe_undef)) arg) {
|
|
return;
|
|
}
|
|
|
|
template
|
|
void test4<float>(float arg);
|
|
|
|
template
|
|
void test4<int>(int arg);
|
|
|
|
void test() {
|
|
int Var1;
|
|
float Var2;
|
|
test4<int>(Var1);
|
|
test4<float>(Var2);
|
|
}
|