Files
RedBear-OS/local/recipes/dev/libclc/source/clang/test/CodeGenCXX/member-functions.cpp
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
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).
2026-08-01 05:13:02 +03:00

85 lines
1.4 KiB
C++

// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin9 -o - %s | FileCheck %s
struct C {
void f();
void g(int, ...);
};
// CHECK-LABEL: define{{.*}} void @_ZN1C1fEv
void C::f() {
}
// CHECK-LABEL: define{{.*}} void @_Z5test1v
void test1() {
C c;
// CHECK: call void @_ZN1C1fEv
c.f();
// CHECK: call void (ptr, i32, ...) @_ZN1C1gEiz
c.g(1, 2, 3);
}
struct S {
inline S() { }
inline ~S() { }
void f_inline1() { }
inline void f_inline2() { }
static void g() { }
static void f();
virtual void v() {}
};
// CHECK-LABEL: define{{.*}} void @_ZN1S1fEv
void S::f() {
}
void test2() {
S s;
s.f_inline1();
s.f_inline2();
S::g();
}
// S::S()
// CHECK: define linkonce_odr void @_ZN1SC1Ev{{.*}} unnamed_addr
// S::f_inline1()
// CHECK-LABEL: define linkonce_odr void @_ZN1S9f_inline1Ev
// S::f_inline2()
// CHECK-LABEL: define linkonce_odr void @_ZN1S9f_inline2Ev
// S::g()
// CHECK-LABEL: define linkonce_odr void @_ZN1S1gEv
// S::~S()
// CHECK: define linkonce_odr void @_ZN1SD1Ev{{.*}} unnamed_addr
struct T {
T operator+(const T&);
};
// CHECK-LABEL: define{{.*}} void @_Z5test3v
void test3() {
T t1, t2;
// CHECK: call void @_ZN1TplERKS_
T result = t1 + t2;
}
// S::S()
// CHECK: define linkonce_odr void @_ZN1SC2Ev{{.*}} unnamed_addr
// S::v()
// CHECK: define linkonce_odr void @_ZN1S1vEv{{.*}}unnamed_addr
// S::~S()
// CHECK: define linkonce_odr void @_ZN1SD2Ev{{.*}} unnamed_addr