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
77 lines
3.1 KiB
C++
77 lines
3.1 KiB
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
struct A { // #A
|
|
};
|
|
|
|
struct B {
|
|
struct C{}; // #B_C
|
|
enum E{};
|
|
};
|
|
|
|
namespace NS {
|
|
struct D{};
|
|
}
|
|
|
|
enum E {}; // #E
|
|
|
|
typedef int T;
|
|
using U = int;
|
|
|
|
// Basic sanity check on the original fuzzing generated syntax
|
|
template <class T = U struct B::C> void test_template();
|
|
// expected-error@-1{{cannot combine with previous 'type-name' declaration specifier}}
|
|
|
|
// The bug we're looking at is the result of parsing repeated named type
|
|
// specifiers. All the record types actually go through a single path, so
|
|
// we don't repeat all of them. The first few are a basic sanity check of
|
|
// each one anyway
|
|
A struct B::C test01;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
A union B::C test02;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
// expected-error@-2 {{use of 'C' with tag type that does not match previous declaration}}
|
|
// expected-note@#B_C {{previous use is here}}
|
|
A class B::C test03;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
A struct NS::D test04;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
A struct ::A test05;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
T struct B::C test06;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
U struct B::C test07;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
|
|
// enums _do_ need separate testing as they have a different syntax, and so
|
|
// take a different path through the parser
|
|
E struct B::C test08;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
A enum ::A test09;
|
|
// expected-error@-1 {{use of 'A' with tag type that does not match previous declaration}}
|
|
// expected-note@#A {{previous use is here}}
|
|
|
|
A enum ::E test10;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
E enum B::E test11;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
E enum ::E test12;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
T enum ::E test13;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
E struct ::E test14;
|
|
// expected-error@-1 {{use of 'E' with tag type that does not match previous declaration}}
|
|
// expected-note@#E {{previous use is here}}
|
|
|
|
// These cases also _technically_ go wrong, but when the initial type specifier
|
|
// is namespaced, we get the required info from the parser directly, which avoids
|
|
// the reading from the corrupted scope
|
|
B::C struct ::B test15;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
B::C struct B::C test16;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
B::C struct NS::D test17;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|
|
|
|
using Test18 = A struct ::A;
|
|
// expected-error@-1 {{cannot combine with previous 'type-name' declaration specifier}}
|