diff --git a/clang/test/CXX/drs/dr14xx.cpp b/clang/test/CXX/drs/dr14xx.cpp index 9d667db9945fd..ea41a03d3587a 100644 --- a/clang/test/CXX/drs/dr14xx.cpp +++ b/clang/test/CXX/drs/dr14xx.cpp @@ -488,6 +488,17 @@ namespace dr1479 { // dr1479: yes int operator"" _a(const char*, std::size_t = 0); // expected-error {{literal operator cannot have a default argument}} } +namespace dr1482 { // dr1482: yes + // NB: sup 2516, test reused there +#if __cplusplus >= 201103L +template struct S { + typedef char I; +}; +enum E2 : S::I { e }; +// expected-error@-1 {{use of undeclared identifier 'E2'}} +#endif +} // namespace dr1482 + namespace dr1490 { // dr1490: 3.7 c++11 // List-initialization from a string literal diff --git a/clang/test/CXX/drs/dr25xx.cpp b/clang/test/CXX/drs/dr25xx.cpp index 28ebda22a8017..b41f026e629f0 100644 --- a/clang/test/CXX/drs/dr25xx.cpp +++ b/clang/test/CXX/drs/dr25xx.cpp @@ -1,5 +1,16 @@ // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown %s -verify +namespace dr2516 { // dr2516: yes + // NB: reusing 1482 test +#if __cplusplus >= 201103L +template struct S { + typedef char I; +}; +enum E2 : S::I { e }; +// expected-error@-1 {{use of undeclared identifier 'E2'}} +#endif +} // namespace dr2516 + namespace dr2518 { // dr2518: 17 template diff --git a/clang/test/CXX/drs/dr9xx.cpp b/clang/test/CXX/drs/dr9xx.cpp index 3d45dc8e72d2d..4dfb98e5ec11e 100644 --- a/clang/test/CXX/drs/dr9xx.cpp +++ b/clang/test/CXX/drs/dr9xx.cpp @@ -90,6 +90,19 @@ namespace dr974 { // dr974: yes #endif } +namespace dr977 { // dr977: yes +enum E { e = E() }; +#ifndef _WIN32 +// expected-error@-2 {{invalid use of incomplete type 'E'}} +// expected-note@-3 {{definition of 'dr977::E' is not complete until the closing '}'}} +#endif +#if __cplusplus >= 201103L +enum E2 : int { e2 = E2() }; +enum struct E3 { e = static_cast(E3()) }; +enum struct E4 : int { e = static_cast(E4()) }; +#endif +} // namespace dr977 + namespace dr990 { // dr990: 3.5 #if __cplusplus >= 201103L struct A { // expected-note 2{{candidate}} diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 4f687e9bcbdcc..cf4cdbb19a7e2 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -5669,7 +5669,7 @@

C++ defect report implementation status

977 CD3 When is an enumeration type complete? - Unknown + Yes 978 @@ -8699,7 +8699,7 @@

C++ defect report implementation status

1482 CD3 Point of declaration of enumeration - Unknown + Yes 1483 @@ -14903,7 +14903,7 @@

C++ defect report implementation status

2516 DR Locus of enum-specifier or opaque-enum-declaration - Unknown + Yes 2517