|
1 | 1 | // RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors
|
2 | 2 | // RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors
|
3 | 3 | // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors
|
4 |
| -// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors |
5 |
| -// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors |
6 |
| -// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors |
7 |
| -// RUN: %clang_cc1 -std=c++2c -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11 -fexceptions -fcxx-exceptions -pedantic-errors |
| 4 | +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11,since-cxx17 -fexceptions -fcxx-exceptions -pedantic-errors |
| 5 | +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11,since-cxx17 -fexceptions -fcxx-exceptions -pedantic-errors |
| 6 | +// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11,since-cxx17 -fexceptions -fcxx-exceptions -pedantic-errors |
| 7 | +// RUN: %clang_cc1 -std=c++2c -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11,since-cxx17 -fexceptions -fcxx-exceptions -pedantic-errors |
8 | 8 |
|
9 | 9 |
|
10 | 10 | namespace cwg2211 { // cwg2211: 8
|
@@ -196,6 +196,17 @@ void g() {
|
196 | 196 | #endif
|
197 | 197 | } // namespace cwg2277
|
198 | 198 |
|
| 199 | +namespace cwg2285 { // cwg2285: 4 |
| 200 | +// Note: Clang 4 implements this DR but it set a wrong value of `__cplusplus` |
| 201 | +#if __cplusplus >= 201703L |
| 202 | + void test() { |
| 203 | + using T = int[1]; |
| 204 | + auto [a] = T{a}; |
| 205 | + // since-cxx17-error@-1 {{binding 'a' cannot appear in the initializer of its own decomposition declaration}} |
| 206 | + } |
| 207 | +#endif |
| 208 | +} // namespace cwg2285 |
| 209 | + |
199 | 210 | namespace cwg2292 { // cwg2292: 9
|
200 | 211 | #if __cplusplus >= 201103L
|
201 | 212 | template<typename T> using id = T;
|
|
0 commit comments