Files
TheRock/compiler/amd-llvm/clang/test/SemaCXX/crash-GH67914.cpp
T
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

79 lines
2.3 KiB
C++

// RUN: %clang_cc1 -verify -std=c++98 %s
// RUN: %clang_cc1 -verify -std=c++11 %s
// RUN: %clang_cc1 -verify -std=c++14 %s
// RUN: %clang_cc1 -verify -std=c++17 %s
// RUN: %clang_cc1 -verify -std=c++20 %s
// RUN: %clang_cc1 -verify -std=c++23 %s
// RUN: %clang_cc1 -verify -std=c++2c %s
// https://github.com/llvm/llvm-project/issues/67914
template < typename, int >
struct Mask;
template < int, class >
struct conditional {
using type = Mask< int, 16 >; // expected-warning 0+ {{}}
};
template < class _Then >
struct conditional< 0, _Then > {
using type = _Then; // expected-warning 0+ {{}}
};
template < int _Bp, class, class _Then >
using conditional_t = typename conditional< _Bp, _Then >::type; // expected-warning 0+ {{}}
template < typename, int >
struct Array;
template < typename, int, bool, typename >
struct StaticArrayImpl;
template < typename Value_, int Size_ >
struct Mask : StaticArrayImpl< Value_, Size_, 1, Mask< Value_, Size_ > > { // expected-note 0+ {{}}
template < typename T1 >
Mask(T1) {} // expected-note 0+ {{}}
};
template < typename T >
void load(typename T::MaskType mask) {
T::load_(mask); // expected-note 0+ {{}}
}
template < typename Value_, int IsMask_, typename Derived_ >
struct StaticArrayImpl< Value_, 32, IsMask_, Derived_ > {
using Array1 = conditional_t< IsMask_, void, Array< Value_, 16 > >; // expected-warning 0+ {{}}
template < typename Mask >
static Derived_ load_(Mask mask) {
return Derived_{load< Array1 >(mask.a1), Mask{}}; // expected-error 0+ {{}}
}
Array1 a1;
};
template < typename Derived_ >
struct KMaskBase;
template < typename Derived_ >
struct StaticArrayImpl< float, 16, 0, Derived_ > {
template < typename Mask >
static Derived_ load_(Mask mask);
};
template < typename Derived_ >
struct StaticArrayImpl< float, 16, 1, Mask< float, 16 > > : KMaskBase< Derived_ > {}; // expected-error 0+ {{}}
template < typename Derived_ >
struct StaticArrayImpl< int, 16, 1, Derived_ > {};
template < typename Value_, int Size_ >
struct Array : StaticArrayImpl< Value_, Size_, 0, Array< Value_, Size_ > > {
using MaskType = Mask< Value_, Size_ >; // expected-warning 0+ {{}}
};
void test11_load_masked() {
load< Array< float, 32 > >{} == 0; // expected-error 0+ {{}} expected-warning 0+ {{}} expected-note 0+ {{}}
}