Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

170 lines
3.6 KiB
C

// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
int pr8880_1(void) {
int first = 1;
for ( ; ({ if (first) { first = 0; continue; } 0; }); ) // expected-error {{'continue' statement not in loop statement}}
return 0;
return 1;
}
void pr8880_2(int first) {
for ( ; ({ if (first) { first = 0; break; } 0; }); ) {} // expected-error {{'break' statement not in loop or switch statement}}
}
void pr8880_3(int first) {
for ( ; ; (void)({ if (first) { first = 0; continue; } 0; })) {} // expected-error {{'continue' statement not in loop statement}}
}
void pr8880_4(int first) {
for ( ; ; (void)({ if (first) { first = 0; break; } 0; })) {} // expected-error {{'break' statement not in loop or switch statement}}
}
void pr8880_5 (int first) {
while(({ if (first) { first = 0; continue; } 0; })) {} // expected-error {{'continue' statement not in loop statement}}
}
void pr8880_6 (int first) {
while(({ if (first) { first = 0; break; } 0; })) {} // expected-error {{'break' statement not in loop or switch statement}}
}
void pr8880_7 (int first) {
do {} while(({ if (first) { first = 0; continue; } 0; })); // expected-error {{'continue' statement not in loop statement}}
}
void pr8880_8 (int first) {
do {} while(({ if (first) { first = 0; break; } 0; })); // expected-error {{'break' statement not in loop or switch statement}}
}
void pr8880_10(int i) {
for ( ; i != 10 ; i++ )
for ( ; ; (void)({ ++i; continue; i;})) {}
}
void pr8880_11(int i) {
for ( ; i != 10 ; i++ )
for ( ; ; (void)({ ++i; break; i;})) {}
}
void pr8880_12(int i, int j) {
for ( ; i != 10 ; i++ )
for ( ; ({if (i) continue; i;}); j++) {}
}
void pr8880_13(int i, int j) {
for ( ; i != 10 ; i++ )
for ( ; ({if (i) break; i;}); j++) {}
}
void pr8880_14(int i) {
for ( ; i != 10 ; i++ )
while(({if (i) break; i;})) {}
}
void pr8880_15(int i) {
while (--i)
while(({if (i) continue; i;})) {}
}
void pr8880_16(int i) {
for ( ; i != 10 ; i++ )
do {} while(({if (i) break; i;}));
}
void pr8880_17(int i) {
for ( ; i != 10 ; i++ )
do {} while(({if (i) continue; i;}));
}
void pr8880_18(int x, int y) {
while(x > 0)
switch(({if(y) break; y;})) {
case 2: x = 0;
}
}
void pr8880_19(int x, int y) {
switch(x) {
case 1:
switch(({if(y) break; y;})) {
case 2: x = 0;
}
}
}
void pr8880_20(int x, int y) {
switch(x) {
case 1:
while(({if (y) break; y;})) {}
}
}
void pr8880_21(int x, int y) {
switch(x) {
case 1:
do {} while(({if (y) break; y;}));
}
}
void pr8880_22(int x, int y) {
switch(x) {
case 1:
for ( ; ; (void)({ ++y; break; y;})) {}
}
}
void pr8880_23(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; break; y;}); ++y) {}
}
}
void pr32648_1(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; switch (y) { case 0: break; } y;}); ++y) {} // no warning
}
}
void pr32648_2(int x, int y) {
while(x) {
for ( ; ({ ++y; switch (y) { case 0: continue; } y;}); ++y) {}
}
}
void pr32648_3(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; for (; y; y++) { break; } y;}); ++y) {} // no warning
}
}
void pr32648_4(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; for (({ break; }); y; y++) { } y;}); ++y) {}
}
}
void pr32648_5(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; while (({ break; y; })) {} y;}); ++y) {}
}
}
void pr32648_6(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; do {} while (({ break; y; })); y;}); ++y) {}
}
}
void pr32648_7(int x, int y) {
switch(x) {
case 1:
for ( ; ({ ++y; do { break; } while (y); y;}); ++y) {} // no warning
}
}