Add PR check to suggest alternatives to using undef (#118506)
[llvm-project.git] / clang / test / Parser / cxx2b-lambdas-ext-warns.cpp
blob7ffb7aae9d391a87183cd0f20dc4817429252d55
1 // RUN: %clang_cc1 -std=c++20 %s -verify=cxx20
2 // RUN: %clang_cc1 -std=c++23 %s -verify=cxx23
3 // RUN: %clang_cc1 -std=c++23 -Wpre-c++23-compat %s -verify=precxx23
4 // RUN: %clang_cc1 -std=c++23 -pedantic %s -verify=cxx23
6 //cxx23-no-diagnostics
8 auto L1 = [] constexpr {};
9 // cxx20-warning@-1 {{lambda without a parameter clause is a C++23 extension}}
10 auto L2 = []() static {};
11 // cxx20-warning@-1 {{static lambdas are a C++23 extension}}
12 // precxx23-warning@-2 {{static lambdas are incompatible with C++ standards before C++23}}
13 auto L3 = [] static {};
14 // cxx20-warning@-1 {{lambda without a parameter clause is a C++23 extension}}
15 // cxx20-warning@-2 {{static lambdas are a C++23 extension}}
16 // precxx23-warning@-3 {{static lambdas are incompatible with C++ standards before C++23}}