Files
RedBear-OS/local/recipes/dev/libclc/source/clang/test/CodeGenObjCXX/rtti.mm
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

54 lines
2.0 KiB
Plaintext

// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
// PR7864. This all follows GCC's lead.
namespace std { class type_info; }
@interface A
@end
@interface B : A
@end
// CHECK: @_ZTIP1B = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP1B{{.*}}, i32 0, {{.*}}@_ZTI1B
// CHECK: @_ZTI1B = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv120__si_class_type_infoE{{.*}}@_ZTS1B{{.*}}@_ZTI1A
// CHECK: @_ZTI1A = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS1A
// CHECK: @_ZTIP11objc_object = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP11objc_object{{.*}}@_ZTI11objc_object
// CHECK: @_ZTI11objc_object = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS11objc_object
// CHECK: @_ZTIP10objc_class = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP10objc_class{{.*}}@_ZTI10objc_class
// CHECK: @_ZTI10objc_class = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS10objc_class
@protocol P;
int main() {
// CHECK: store {{.*}} @_ZTIP1B
// CHECK: store {{.*}} @_ZTI1B
const std::type_info &t1 = typeid(B*);
const std::type_info &t2 = typeid(B);
// CHECK: store {{.*}} @_ZTIP11objc_object
// CHECK: store {{.*}} @_ZTI11objc_object
id i = 0;
const std::type_info &t3 = typeid(i);
const std::type_info &t4 = typeid(*i);
// CHECK: store {{.*}} @_ZTIP10objc_class
// CHECK: store {{.*}} @_ZTI10objc_class
Class c = 0;
const std::type_info &t5 = typeid(c);
const std::type_info &t6 = typeid(*c);
// CHECK: store {{.*}} @_ZTIPU11objcproto1P11objc_object
// CHECK: store {{.*}} @_ZTIU11objcproto1P11objc_object
id<P> i2 = 0;
const std::type_info &t7 = typeid(i2);
const std::type_info &t8 = typeid(*i2);
// CHECK: store {{.*}} @_ZTIPU11objcproto1P10objc_class
// CHECK: store {{.*}} @_ZTIU11objcproto1P10objc_class
Class<P> c2 = 0;
const std::type_info &t9 = typeid(c2);
const std::type_info &t10 = typeid(*c2);
}