[clang] [clang] Fix rejects-valid on break label; with multiple labels on a loop (PR #246516)
Shengxin Pei via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 28 07:17:32 PST 2026
================
@@ -86,3 +86,25 @@ void f7() {
});
}
}
+
+void f8() {
+ a: b: while (true) {
+ break a;
+ continue a;
+ break b;
+ continue b;
+ }
+}
+
+void f9() {
+ switch (0) {
+ a: default: while (true) {
+ break a;
+ continue a;
+ }
+ b: case 0: while (true) {
+ break b;
+ continue b;
+ }
+ }
+}
----------------
TPPPP72 wrote:
It looks like this PR shouldn't involve any changes to the C++ parser or sema, right?
https://github.com/llvm/llvm-project/pull/246516
More information about the cfe-commits
mailing list