Files
TheRock/compiler/amd-llvm/clang/test/Preprocessor/dump-tokens.cpp
T
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

38 lines
3.7 KiB
C++

// RUN: %clang_cc1 -dump-tokens %s 2>&1 | FileCheck %s --strict-whitespace
// To make location reporting in the test more robust, provide line number and file name explicitly.
#line 2 "dump-tokens.cpp"
// Different kinds of identifiers with different spelling lengths.
-> // CHECK: arrow '->' Loc=<{{.*}}:4:1> [StartOfLine]
5 // CHECK-NEXT: numeric_constant '5' Loc=<{{.*}}:5:1> [StartOfLine]
id // CHECK-NEXT: identifier 'id' Loc=<{{.*}}:6:1> [StartOfLine]
& // CHECK-NEXT: amp '&' Loc=<{{.*}}:7:1> [StartOfLine]
) // CHECK-NEXT: r_paren ')' Loc=<{{.*}}:8:1> [StartOfLine]
unsigned // CHECK-NEXT: unsigned 'unsigned' Loc=<{{.*}}:9:1> [StartOfLine]
~ // CHECK-NEXT: tilde '~' Loc=<{{.*}}:10:1> [StartOfLine]
long_variable_name_very_long // CHECK-NEXT: identifier 'long_variable_name_very_long' Loc=<{{.*}}:11:1> [StartOfLine]
union // CHECK-NEXT: union 'union' Loc=<{{.*}}:12:1> [StartOfLine]
42 // CHECK-NEXT: numeric_constant '42' Loc=<{{.*}}:13:1> [StartOfLine]
j // CHECK-NEXT: identifier 'j' Loc=<{{.*}}:14:1> [StartOfLine]
&= // CHECK-NEXT: ampequal '&=' Loc=<{{.*}}:15:1> [StartOfLine]
15 // CHECK-NEXT: numeric_constant '15' Loc=<{{.*}}:16:1> [StartOfLine]
// Different locations in line and trailing markers.
at different locations= in line // CHECK-NEXT: identifier 'at' Loc=<{{.*}}:19:2> [StartOfLine] [LeadingSpace]
// CHECK-NEXT: identifier 'different' Loc=<{{.*}}:19:5> [LeadingSpace]
// CHECK-NEXT: identifier 'locations' Loc=<{{.*}}:19:15> [LeadingSpace]
// CHECK-NEXT: equal '=' Loc=<{{.*}}:19:24>
// CHECK-NEXT: identifier 'in' Loc=<{{.*}}:19:26> [LeadingSpace]
// CHECK-NEXT: identifier 'line' Loc=<{{.*}}:19:29> [LeadingSpace]
// Tokens that require escaping & annotations.
#pragma clang __debug parser_crash // CHECK-NEXT: annot_pragma_parser_crash Loc=<{{.*}}:27:23>
// CHECK-NEXT: eod '\n' Loc=<{{.*}}:27:119> [LeadingSpace]
#pragma clang __debug captured // CHECK-NEXT: annot_pragma_captured Loc=<{{.*}}:29:120>
#pragma clang __debug dump X // CHECK-NEXT: annot_pragma_dump Loc=<{{.*}}:30:23>
// CHECK-NEXT: identifier 'X' Loc=<{{.*}}:30:28> [LeadingSpace]
// CHECK-NEXT: eod '\n' Loc=<{{.*}}:30:119> [LeadingSpace]
// CHECK-NEXT: eof '' Loc=<{{.*}}:34:1>