Files
TheRock/compiler/amd-llvm/clang/test/Misc/diag-verify.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

49 lines
2.4 KiB
C++

// RUN: not %clang_cc1 -fsyntax-only -verify %s 2>&1 | FileCheck %s
// Test the -verify flag. Each of the "x = y;" lines will produce a
// "use of undeclared identifier 'y'" error message.
void test() {
int x;
// Proper matches here.
x = y; // expected-error{{use of undeclared identifier 'y'}}
x = y; // expected-error{{use of undeclared identifier}}
x = y; // expected-error{{undeclared identifier 'y'}}
x = y; // expected-error{{use of}}
x = y; // expected-error{{undeclared identifier}}
x = y; // expected-error{{'y'}}
// Bad matches here.
x = y; // expected-error{{use of undeclared identifier 'y' is fine}}
x = y; // expected-error{{abuse of undeclared identifier 'y'}}
x = y; // expected-error{{good use of undeclared identifier 'y' in code}}
x = y; // expected-error{{ use of undeclared identifier 'y' }}
x = y; // expected-error{{use of undeclared identifier 'y' is disallowed}}
x = y; // expected-error{{please don't use of undeclared identifier 'y'}}
x = y; // expected-error{{use of undeclared identifier 'y'; please declare y before use}}
x = y; // expected-error{{use of use of undeclared identifier 'y'}}
x = y; // expected-error{{use of undeclared identifier 'y' identifier 'y'}}
}
//CHECK: error: 'expected-error' diagnostics expected but not seen:
//CHECK: Line 17: use of undeclared identifier 'y' is fine
//CHECK: Line 18: abuse of undeclared identifier 'y'
//CHECK: Line 19: good use of undeclared identifier 'y' in code
//CHECK: Line 20: use of undeclared identifier 'y'
//CHECK: Line 21: use of undeclared identifier 'y' is disallowed
//CHECK: Line 22: please don't use of undeclared identifier 'y'
//CHECK: Line 23: use of undeclared identifier 'y'; please declare y before use
//CHECK: Line 24: use of use of undeclared identifier 'y'
//CHECK: Line 25: use of undeclared identifier 'y' identifier 'y'
//CHECK: error: 'expected-error' diagnostics seen but not expected:
//CHECK: Line 17: use of undeclared identifier 'y'
//CHECK: Line 18: use of undeclared identifier 'y'
//CHECK: Line 19: use of undeclared identifier 'y'
//CHECK: Line 20: use of undeclared identifier 'y'
//CHECK: Line 21: use of undeclared identifier 'y'
//CHECK: Line 22: use of undeclared identifier 'y'
//CHECK: Line 23: use of undeclared identifier 'y'
//CHECK: Line 24: use of undeclared identifier 'y'
//CHECK: Line 25: use of undeclared identifier 'y'
//CHECK: 18 errors generated.