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

84 lines
1.9 KiB
C

// RUN: %clang_cc1 -x assembler-with-cpp -E %s -o - | FileCheck -strict-whitespace -check-prefix=CHECK-Identifiers-False %s
#ifndef __ASSEMBLER__
#error "__ASSEMBLER__ not defined"
#endif
// Invalid token pasting is ok.
#define A X ## .
1: A
// CHECK-Identifiers-False: 1: X .
// Line markers are not linemarkers in .S files, they are passed through.
# 321
// CHECK-Identifiers-False: # 321
// Unknown directives are passed through.
# B C
// CHECK-Identifiers-False: # B C
// Unknown directives are expanded.
#define D(x) BAR ## x
# D(42)
// CHECK-Identifiers-False: # BAR42
// Unmatched quotes are permitted.
2: '
3: "
// CHECK-Identifiers-False: 2: '
// CHECK-Identifiers-False: 3: "
// (balance quotes to keep editors happy): "'
// Empty char literals are ok.
4: ''
// CHECK-Identifiers-False: 4: ''
// Portions of invalid pasting should still expand as macros.
#define M4 expanded
#define M5() M4 ## (
5: M5()
// CHECK-Identifiers-False: 5: expanded (
#define FOO(name) name ## $foo
6: FOO(blarg)
// CHECK-Identifiers-False: 6: blarg $foo
// RUN: %clang_cc1 -x assembler-with-cpp -fdollars-in-identifiers -E %s -o - | FileCheck -check-prefix=CHECK-Identifiers-True -strict-whitespace %s
#define FOO(name) name ## $foo
7: FOO(blarg)
// CHECK-Identifiers-True: 7: blarg$foo
//
#define T6() T6 #nostring
#define T7(x) T7 #x
8: T6()
9: T7(foo)
// CHECK-Identifiers-True: 8: T6 #nostring
// CHECK-Identifiers-True: 9: T7 "foo"
// Concatenation with period doesn't leave a space
#define T8(A,B) A ## B
10: T8(.,T8)
// CHECK-Identifiers-True: 10: .T8
// This should not crash.
#define T11(a) #0
11: T11(b)
// CHECK-Identifiers-True: 11: #0
// Universal character names can specify basic ascii and control characters
12: \u0020\u0030
// CHECK-Identifiers-False: 12: \u0020\u0030
// This should not crash
# ##
// CHECK-Identifiers-False: # ##
#define X(a) # # # 1
X(1)
// CHECK-Identifiers-False: # # # 1