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

46 lines
1.5 KiB
C++

// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++98
// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++11
// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++14
// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++17
// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++20
// RUN: %clang_cc1 -E -pedantic-errors %s -verify=expected,since-cxx23 -std=c++23 -Wno-c23-extensions
// RUN: %clang_cc1 -E -pedantic-errors %s -verify=expected,since-cxx23 -std=c++2c -Wno-c23-extensions
// Test 1: Top-level comma
// expected-error@+1 {{expected end of line in preprocessor expression}}
#if 1, 2
#endif
// Test 2: Comma in conditional expression(CWG3017)
// Per CWG 3017, this exact case highlights the specification gap
// where C++ lacks explicit prohibition of comma operators in #if
// expected-error@+1 {{comma operator in operand of #if}}
#if 1 ? 1, 0 : 3
#endif
// Test 3: Parenthesized comma
// expected-error@+1 {{comma operator in operand of #if}}
#if (1, 2)
#endif
// Test 4: Multiple commas
// expected-error@+1 {{expected end of line in preprocessor expression}}
#if 1, 2, 3
#endif
// Test 5: Comma in #elif
#if 0
#elif (1, 2) // expected-error {{comma operator in operand of #if}}
#endif
// Test 6: Leading comma (syntax error)
// expected-error@+1 {{invalid token at start of a preprocessor expression}}
#if ,
#endif
// Test 7: Comma in #embed limit parameter (C++23+)
#if __cplusplus >= 202302L
// since-cxx23-error@+1 {{expected ')'}}
#embed "jk.txt" limit(1, 2)
#endif