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

131 lines
3.4 KiB
C

// RUN: %clang_cc1 %s -Eonly -verify
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef BAR
#error "did not expect to get here"
#endif
/* expected-error@+5 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef BAR
#else
#error "got it"
#endif
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C23 extension}} */
#ifdef FOO
#elifndef BAR
#error "got it"
#endif
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C23 extension}} */
#ifdef FOO
#elifndef BAR
#error "got it"
#else
#error "did not expect to get here"
#endif
#define BAR
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef BAR
#error "got it"
#endif
#undef BAR
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef BAR // test that comments aren't an issue
#error "did not expect to get here"
#endif
/* expected-error@+5 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef BAR // test that comments aren't an issue
#else
#error "got it"
#endif
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C23 extension}} */
#ifdef FOO
#elifndef BAR // test that comments aren't an issue
#error "got it"
#endif
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifndef' directive is a C23 extension}} */
#ifdef FOO
#elifndef BAR // test that comments aren't an issue
#error "got it"
#else
#error "did not expect to get here"
#endif
#define BAR
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+2 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#elifdef BAR // test that comments aren't an issue
#error "got it"
#endif
#undef BAR
#define BAR
/* expected-error@+7 {{"got it"}} */
/* expected-warning@+3 {{use of a '#elifndef' directive is a C23 extension}} */
#ifdef FOO
#error "did not expect to get here"
#elifndef BAR
#error "did not expect to get here"
#else
#error "got it"
#endif
#undef BAR
/* expected-error@+4 {{#elifdef after #else}} */
/* expected-warning@+3 {{use of a '#elifdef' directive is a C23 extension}} */
#ifdef FOO
#else
#elifdef BAR
#endif
/* expected-error@+4 {{#elifndef after #else}} */
/* expected-warning@+3 {{use of a '#elifndef' directive is a C23 extension}} */
#ifdef FOO
#else
#elifndef BAR
#endif
/* expected-warning@+1 {{use of a '#elifdef' directive is a C23 extension}} */
#elifdef FOO /* expected-error {{#elifdef without #if}} */
#endif /* expected-error {{#endif without #if}} */
/* expected-warning@+1 {{use of a '#elifndef' directive is a C23 extension}} */
#elifndef FOO /* expected-error {{#elifndef without #if}} */
#endif /* expected-error {{#endif without #if}} */
/* Note, we do not expect errors about the missing macro name in the skipped
blocks. This is consistent with #elif behavior. */
/* expected-error@+4 {{"got it"}} */
/* expected-warning@+4 {{use of a '#elifdef' directive is a C23 extension}} */
/* expected-warning@+4 {{use of a '#elifndef' directive is a C23 extension}} */
#ifndef FOO
#error "got it"
#elifdef
#elifndef
#endif
/* expected-error@+3 {{#elif after #else}}*/
#if 1
#else
#elif
#endif