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
117 lines
3.5 KiB
C++
117 lines
3.5 KiB
C++
// RUN: %clang_cc1 %s -fsyntax-only -verify
|
|
|
|
namespace CurrentInstantiation {
|
|
template<typename T>
|
|
struct A0 { // expected-note 6{{definition of 'CurrentInstantiation::A0<T>' is not complete until the closing '}'}}
|
|
struct B0 : A0 { }; // expected-error {{base class has incomplete type}}
|
|
|
|
template<typename U>
|
|
struct B1 : A0 { }; // expected-error {{base class has incomplete type}}
|
|
|
|
struct B2;
|
|
|
|
template<typename U>
|
|
struct B3;
|
|
|
|
struct B4 { // expected-note 2{{definition of 'CurrentInstantiation::A0::B4' is not complete until the closing '}'}}
|
|
struct C0 : A0, B4 { }; // expected-error 2{{base class has incomplete type}}
|
|
|
|
template<typename V>
|
|
struct C1 : A0, B4 { }; // expected-error 2{{base class has incomplete type}}
|
|
|
|
struct C2;
|
|
|
|
template<typename V>
|
|
struct C3;
|
|
};
|
|
|
|
template<typename U>
|
|
struct B5 { // expected-note 2{{definition of 'CurrentInstantiation::A0::B5<U>' is not complete until the closing '}'}}
|
|
struct C0 : A0, B5 { }; // expected-error 2{{base class has incomplete type}}
|
|
|
|
template<typename V>
|
|
struct C1 : A0, B5 { }; // expected-error 2{{base class has incomplete type}}
|
|
|
|
struct C2;
|
|
|
|
template<typename V>
|
|
struct C3;
|
|
};
|
|
};
|
|
|
|
template<typename T>
|
|
struct A0<T>::B2 : A0 { };
|
|
|
|
template<typename T>
|
|
template<typename U>
|
|
struct A0<T>::B3 : A0 { };
|
|
|
|
template<typename T>
|
|
struct A0<T>::B4::C2 : A0, B4 { };
|
|
|
|
template<typename T>
|
|
template<typename V>
|
|
struct A0<T>::B4::C3 : A0, B4 { };
|
|
|
|
template<typename T>
|
|
template<typename U>
|
|
struct A0<T>::B5<U>::C2 : A0, B5 { };
|
|
|
|
template<typename T>
|
|
template<typename U>
|
|
template<typename V>
|
|
struct A0<T>::B5<U>::C3 : A0, B5 { };
|
|
|
|
template<typename T>
|
|
struct A0<T*> { // expected-note 2{{definition of 'CurrentInstantiation::A0<T *>' is not complete until the closing '}'}}
|
|
struct B0 : A0 { }; // expected-error {{base class has incomplete type}}
|
|
|
|
template<typename U>
|
|
struct B1 : A0 { }; // expected-error {{base class has incomplete type}}
|
|
|
|
struct B2;
|
|
|
|
template<typename U>
|
|
struct B3;
|
|
};
|
|
|
|
template<typename T>
|
|
struct A0<T*>::B2 : A0 { };
|
|
|
|
template<typename T>
|
|
template<typename U>
|
|
struct A0<T*>::B3 : A0 { };
|
|
} // namespace CurrentInstantiation
|
|
|
|
namespace MemberOfCurrentInstantiation {
|
|
template<typename T>
|
|
struct A0 {
|
|
struct B : B { }; // expected-error {{base class has incomplete type}}
|
|
// expected-note@-1 {{definition of 'MemberOfCurrentInstantiation::A0::B' is not complete until the closing '}'}}
|
|
|
|
template<typename U>
|
|
struct C : C<U> { }; // expected-error {{base class has incomplete type}}
|
|
// expected-note@-1 {{definition of 'MemberOfCurrentInstantiation::A0::C<U>' is not complete until the closing '}'}}
|
|
};
|
|
|
|
template<typename T>
|
|
struct A1 {
|
|
struct B; // expected-note {{definition of 'MemberOfCurrentInstantiation::A1<long>::B' is not complete until the closing '}'}}
|
|
|
|
struct C : B { }; // expected-error {{base class has incomplete type}}
|
|
|
|
struct B : C { }; // expected-note {{in instantiation of member class 'MemberOfCurrentInstantiation::A1<long>::C' requested here}}
|
|
};
|
|
|
|
template struct A1<long>; // expected-note {{in instantiation of member class 'MemberOfCurrentInstantiation::A1<long>::B' requested here}}
|
|
|
|
template<>
|
|
struct A1<short>::B {
|
|
static constexpr bool f() {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
static_assert(A1<short>::C::f());
|
|
} // namespace MemberOfCurrentInstantiation
|