We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84a3d71 commit ddede95Copy full SHA for ddede95
clang/test/SemaCXX/cxx2c-expansion-stmt-ext-warn.cpp
@@ -0,0 +1,8 @@
1
+// RUN: %clang_cc1 %s -std=c++2c -fsyntax-only -verify=cxx26 -Wpre-c++26-compat
2
+// RUN: %clang_cc1 %s -std=c++23 -fsyntax-only -verify=cxx23
3
+
4
+void f() {
5
+ template for (auto _ : {1}) { // cxx23-warning {{expansion statements are a C++2c extension}} \
6
+ // cxx26-warning {{expansion statements are incompatible with C++ standards before C++2c}}
7
+ }
8
+}
0 commit comments