|
1 | 1 | // RUN: %clang_cc1 -std=c++98 -pedantic-errors -verify=expected,cxx98 %s
|
2 |
| -// RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected %s |
3 |
| -// RUN: %clang_cc1 -std=c++14 -pedantic-errors -verify=expected %s |
4 |
| -// RUN: %clang_cc1 -std=c++17 -pedantic-errors -verify=expected %s |
5 |
| -// RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify=expected,since-cxx20 %s |
6 |
| -// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx20,since-cxx23 %s |
| 2 | +// RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected,cxx11-23 %s |
| 3 | +// RUN: %clang_cc1 -std=c++14 -pedantic-errors -verify=expected,cxx11-23 %s |
| 4 | +// RUN: %clang_cc1 -std=c++17 -pedantic-errors -verify=expected,cxx11-23 %s |
| 5 | +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -verify=expected,cxx11-23,since-cxx20 %s |
| 6 | +// RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,cxx11-23,since-cxx20,since-cxx23 %s |
7 | 7 | // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx20,since-cxx23,since-cxx26 %s
|
8 | 8 |
|
9 | 9 |
|
@@ -47,12 +47,17 @@ void f() {
|
47 | 47 | #endif
|
48 | 48 | } // namespace cwg2813
|
49 | 49 |
|
50 |
| -namespace cwg2819 { // cwg2819: 19 tentatively ready 2023-12-01 |
51 |
| - |
52 |
| -#if __cpp_constexpr >= 202306L |
| 50 | +namespace cwg2819 { // cwg2819: 19 c++26 |
| 51 | +#if __cplusplus >= 201103L |
| 52 | + // CWG 2024-04-19: This issue is not a DR. |
53 | 53 | constexpr void* p = nullptr;
|
54 |
| - constexpr int* q = static_cast<int*>(p); |
55 |
| - static_assert(q == nullptr); |
| 54 | + constexpr int* q = static_cast<int*>(p); // #cwg2819-q |
| 55 | + // cxx11-23-error@-1 {{constexpr variable 'q' must be initialized by a constant expression}} |
| 56 | + // cxx11-23-note@-2 {{cast from 'void *' is not allowed in a constant expression}} |
| 57 | + static_assert(q == nullptr, ""); |
| 58 | + // cxx11-23-error@-1 {{static assertion expression is not an integral constant expression}} |
| 59 | + // cxx11-23-note@-2 {{initializer of 'q' is not a constant expression}} |
| 60 | + // cxx11-23-note@#cwg2819-q {{declared here}} |
56 | 61 | #endif
|
57 | 62 | }
|
58 | 63 |
|
|
0 commit comments