// RUN: %clang_cc1 -std=c++98 -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s // RUN: %clang_cc1 -std=c++14 -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s // RUN: %clang_cc1 -std=c++17 -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s // RUN: %clang_cc1 -std=c++20 -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s // RUN: %clang_cc1 -std=c++23 -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s // RUN: %clang_cc1 -std=c++2c -fexceptions -fcxx-exceptions -pedantic-errors -verify-directives -verify=expected %s namespace cwg3005 { // cwg3005: 21 void f( int _, // #cwg3005-first-param int _) // expected-error@-1 {{redefinition of parameter '_'}} // expected-note@#cwg3005-first-param {{previous declaration is here}} { int _; // expected-error@-1 {{redefinition of '_'}} // expected-note@#cwg3005-first-param {{previous definition is here}} } } // namespace cwg3005 namespace cwg3035 { // cwg3035: no #if __cplusplus >= 201103L static union { int x = [] { return 42; }(); // FIXME-error@-1 {{lambda expressions are not allowed in anonymous unions}} }; #endif } // namespace cwg3035 // cwg3058: na