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
1023 B
C++
36 lines
1023 B
C++
// Test for debug info related to DW_AT_alignment attribute in the struct type.
|
|
// RUN: %clang_cc1 -dwarf-version=5 -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType", {{.*}}, align: 32
|
|
// CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType1", {{.*}}, align: 8
|
|
// CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType2", {{.*}}, align: 8
|
|
|
|
struct MyType {
|
|
int m;
|
|
} __attribute__((aligned(1)));
|
|
MyType mt;
|
|
|
|
static_assert(alignof(MyType) == 4, "alignof MyType is wrong");
|
|
|
|
struct MyType1 {
|
|
int m;
|
|
} __attribute__((packed, aligned(1)));
|
|
MyType1 mt1;
|
|
|
|
static_assert(alignof(MyType1) == 1, "alignof MyType1 is wrong");
|
|
|
|
struct MyType2 {
|
|
__attribute__((packed)) int m;
|
|
} __attribute__((aligned(1)));
|
|
MyType2 mt2;
|
|
|
|
static_assert(alignof(MyType2) == 1, "alignof MyType2 is wrong");
|
|
|
|
#pragma pack(1)
|
|
struct MyType3 {
|
|
int m;
|
|
};
|
|
MyType3 mt3;
|
|
|
|
static_assert(alignof(MyType3) == 1, "alignof MyType3 is wrong");
|