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).
28 lines
833 B
Plaintext
28 lines
833 B
Plaintext
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
static int gint;
|
|
struct SetSection {
|
|
int & at(int __n) { return gint; }
|
|
const int& at(int __n) const { return gint; }
|
|
};
|
|
|
|
static SetSection gSetSection;
|
|
|
|
@interface SetShow
|
|
- (SetSection&)sections;
|
|
@end
|
|
|
|
@implementation SetShow
|
|
- (SetSection&) sections {
|
|
// [self sections].at(100);
|
|
self.sections.at(100);
|
|
return gSetSection;
|
|
}
|
|
@end
|
|
|
|
// CHECK: [[SELF:%.*]] = alloca ptr, align
|
|
// CHECK: [[T0:%.*]] = load {{.*}}, ptr [[SELF]], align
|
|
// CHECK: [[T1:%.*]] = load {{.*}}, ptr @OBJC_SELECTOR_REFERENCES_
|
|
// CHECK: [[C:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @objc_msgSend
|
|
// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN10SetSection2atEi(ptr {{[^,]*}} [[C]]
|