Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

87 lines
2.1 KiB
C++

// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | FileCheck %s
struct A {
A(const A&);
A();
~A();
};
struct B : public A {
B();
B(const B& Other);
~B();
};
struct C : public B {
C();
C(const C& Other);
~C();
};
struct X {
operator B&();
operator C&();
X(const X&);
X();
~X();
B b;
C c;
};
void test0_helper(A);
void test0(X x) {
test0_helper(x);
// CHECK-LABEL: define{{.*}} void @_Z5test01X(
// CHECK-SAME: ptr noundef [[ARG:%.*]])
// CHECK: [[ARG_ADDR:%.*]] = alloca ptr
// CHECK-NEXT: [[TMP:%.*]] = alloca [[A:%.*]], align
// CHECK-NEXT: store ptr [[ARG]], ptr [[ARG_ADDR]]
// CHECK-NEXT: [[T0:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1XcvR1BEv(
// CHECK-NEXT: call void @_ZN1AC1ERKS_(ptr {{[^,]*}} [[TMP]], ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[T0]])
// CHECK-NEXT: call void @_Z12test0_helper1A(ptr noundef [[TMP]])
// CHECK-NEXT: call void @_ZN1AD1Ev(ptr {{[^,]*}} [[TMP]])
// CHECK-NEXT: ret void
}
struct Base;
struct Root {
operator Base&();
};
struct Derived;
struct Base : Root {
Base(const Base &);
Base();
operator Derived &();
};
struct Derived : Base {
};
void test1_helper(Base);
void test1(Derived bb) {
// CHECK-LABEL: define{{.*}} void @_Z5test17Derived(
// CHECK-NOT: call {{.*}} @_ZN4BasecvR7DerivedEv(
// CHECK: call void @_ZN4BaseC1ERKS_(
// CHECK-NOT: call {{.*}} @_ZN4BasecvR7DerivedEv(
// CHECK: call void @_Z12test1_helper4Base(
test1_helper(bb);
}
// Don't crash after devirtualizing a derived-to-base conversion
// to an empty base allocated at offset zero.
class Test2a {};
class Test2b final : public virtual Test2a {};
void test2(Test2b &x) {
Test2a &y = x;
// CHECK-LABEL: define{{.*}} void @_Z5test2R6Test2b(
// CHECK: [[X:%.*]] = alloca ptr, align 8
// CHECK-NEXT: [[Y:%.*]] = alloca ptr, align 8
// CHECK-NEXT: store ptr {{%.*}}, ptr [[X]], align 8
// CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[X]], align 8
// CHECK-NEXT: store ptr [[T0]], ptr [[Y]], align 8
// CHECK-NEXT: ret void
}