Files
TheRock/compiler/amd-llvm/clang/test/TableGen/emit-diag-docs.td
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

85 lines
6.6 KiB
TableGen

// RUN: clang-tblgen -gen-diag-docs -I%S %s -o - 2>&1 | \
// RUN: FileCheck --strict-whitespace %s
include "DiagnosticBase.inc"
def MyGroup : DiagGroup<"MyGroupName">;
def MyKinds : TextSubstitution<"%select{food|forests}0">;
def MyGoodBad : TextSubstitution<"%select{good|bad}0">;
def MySubNested : TextSubstitution<"%sub{MyGoodBad}1 %sub{MyKinds}2 are %sub{MyGoodBad}1 according to %0">;
// CHECK: -WMyGroupName
// CHECK: **Diagnostic text:**
let Group = MyGroup in {
// CHECK: |:warning:`warning:` |nbsp| |+--------------------------------------------------------------------+|
// CHECK-NEXT: | ||+------------------------------------------------------------------+||
// CHECK-NEXT: | |||:placeholder:`A` |nbsp| :diagtext:`is not` |nbsp| :placeholder:`B`|||
// CHECK-NEXT: | ||+------------------------------------------------------------------+||
// CHECK-NEXT: | |+--------------------------------------------------------------------+|
// CHECK-NEXT: | ||:diagtext:`this is my diff text` ||
// CHECK-NEXT: | |+--------------------------------------------------------------------+|
// CHECK-NEXT: +---------------------------+----------------------------------------------------------------------+
def CheckDiff : Warning<"%diff{$ is not $|this is my diff text}0,1">;
// CHECK: |:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is my modifier test` |nbsp| :placeholder:`B`|
// CHECK-NEXT: +----------------------------------------------------------------------------------------------------------+
def CheckModifier : Warning<"%0 is my modifier test %1">;
// CHECK: |:warning:`warning:` |nbsp| :diagtext:`This is the` |nbsp| :placeholder:`A` |nbsp| :diagtext:`test I've written`|
// CHECK-NEXT: +---------------------------------------------------------------------------------------------------------------+
def CheckOrdinal : Warning<"This is the %ordinal0 test I've written">;
// CHECK: |:warning:`warning:` |nbsp| :diagtext:`I wrote` |nbsp| |+----------------+| |nbsp| :diagtext:`tests`|
// CHECK-NEXT: | ||:diagtext:`no` || |
// CHECK-NEXT: | |+----------------+| |
// CHECK-NEXT: | ||:diagtext:`one` || |
// CHECK-NEXT: | |+----------------+| |
// CHECK-NEXT: | ||:placeholder:`A`|| |
// CHECK-NEXT: | |+----------------+| |
// CHECK-NEXT: +------------------------------------------------------+------------------+-------------------------+
def CheckPlural : Warning<"I wrote %plural{0:no|1:one|:%0}0 tests">;
// CHECK: |:warning:`warning:` |nbsp| :diagtext:`bad type` |nbsp| :placeholder:`A`|
// CHECK-NEXT: +-----------------------------------------------------------------------+
def CheckQ : Warning<"bad type %q0">;
// CHECK: |:warning:`warning:` |nbsp| :diagtext:`My test`|+-------------+| |nbsp| :diagtext:`are the best!`|
// CHECK-NEXT: | || || |
// CHECK-NEXT: | |+-------------+| |
// CHECK-NEXT: | ||:diagtext:`s`|| |
// CHECK-NEXT: | |+-------------+| |
// CHECK-NEXT: +----------------------------------------------+---------------+---------------------------------+
def CheckS : Warning<"My test%s0 are the best!">;
// CHECK: |:warning:`warning:` |nbsp| :diagtext:`this is my select test:` |nbsp| |+---------------+|
// CHECK-NEXT: | ||:diagtext:`one`||
// CHECK-NEXT: | |+---------------+|
// CHECK-NEXT: | ||:diagtext:`two`||
// CHECK-NEXT: | |+---------------+|
// CHECK-NEXT: +----------------------------------------------------------------------+-----------------+
def CheckSelect : Warning<"this is my select test: %select{one|two}0 and it is %select{good|bad}1">;
// CHECK: +-------------------------------------------------------+------------------+--------+---------------------+-------------------------------+------------------+--------------------------------------------------------+
// CHECK-NEXT: |:warning:`warning:` |nbsp| :diagtext:`They say` |nbsp| |+----------------+| |nbsp| |+-------------------+| |nbsp| :diagtext:`are` |nbsp| |+----------------+| |nbsp| :diagtext:`according to` |nbsp| :placeholder:`D`|
// CHECK-NEXT: | ||:diagtext:`good`|| ||:diagtext:`food` || ||:diagtext:`good`|| |
// CHECK-NEXT: | |+----------------+| |+-------------------+| |+----------------+| |
// CHECK-NEXT: | ||:diagtext:`bad` || ||:diagtext:`forests`|| ||:diagtext:`bad` || |
// CHECK-NEXT: | |+----------------+| |+-------------------+| |+----------------+| |
// CHECK-NEXT: +-------------------------------------------------------+------------------+--------+---------------------+-------------------------------+------------------+--------------------------------------------------------+
def CheckSubstitution : Warning<"They say %sub{MySubNested}3,1,0">;
// CHECK: |:warning:`warning:` |nbsp| :diagtext:`this is my warning text`|
// CHECK-NEXT: +--------------------------------------------------------------+
def CheckText : Warning<"this is my warning text">;
}