Files
TheRock/compiler/amd-llvm/clang/test/Driver/diagnostics.c
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

54 lines
2.2 KiB
C

// Parse diagnostic arguments in the driver
// Exactly which arguments are warned about and which aren't differ based
// on what target is selected. -stdlib= and -fuse-ld= emit diagnostics when
// compiling C code, for e.g. *-linux-gnu. Linker inputs, like -lfoo, emit
// diagnostics when only compiling for all targets.
// This is normally a non-fatal warning:
// RUN: %clang --target=x86_64-apple-darwin11 \
// RUN: -fsyntax-only -lfoo %s 2>&1 | FileCheck %s
// Either with a specific -Werror=unused.. or a blanket -Werror, this
// causes the command to fail.
// RUN: not %clang --target=x86_64-apple-darwin11 \
// RUN: -fsyntax-only -lfoo \
// RUN: -Werror=unused-command-line-argument %s 2>&1 | FileCheck %s
// RUN: not %clang --target=x86_64-apple-darwin11 \
// RUN: -fsyntax-only -lfoo -Werror %s 2>&1 | FileCheck %s
// With a specific -Wno-..., no diagnostic should be printed.
// RUN: %clang --target=x86_64-apple-darwin11 \
// RUN: -fsyntax-only -lfoo -Werror \
// RUN: -Wno-unused-command-line-argument %s 2>&1 | count 0
// With -Qunused-arguments, no diagnostic should be printed.
// RUN: %clang --target=x86_64-apple-darwin11 \
// RUN: -fsyntax-only -lfoo -Werror \
// RUN: -Qunused-arguments %s 2>&1 | count 0
// With the argument enclosed in --{start,end}-no-unused-arguments,
// there's no diagnostic.
// RUN: %clang --target=x86_64-apple-darwin11 -fsyntax-only \
// RUN: --start-no-unused-arguments -lfoo --end-no-unused-arguments \
// RUN: -Werror %s 2>&1 | count 0
// With --{start,end}-no-unused-argument around a different argument, it
// still warns about the unused argument.
// RUN: not %clang --target=x86_64-apple-darwin11 \
// RUN: --start-no-unused-arguments -fsyntax-only --end-no-unused-arguments \
// RUN: -lfoo -Werror %s 2>&1 | FileCheck %s
// Test clang-cl warning about unused linker options.
// RUN: not %clang_cl -fsyntax-only /WX \
// RUN: -LD -- %s 2>&1 | FileCheck %s --check-prefix=CL-WARNING
// Test clang-cl ignoring the warning with --start-no-unused-arguments.
// RUN: %clang_cl -fsyntax-only /WX \
// RUN: --start-no-unused-arguments /LD --end-no-unused-arguments -- %s 2>&1 | count 0
// CHECK: -lfoo: 'linker' input unused
// CL-WARNING: argument unused during compilation: '-LD'