Files
TheRock/compiler/amd-llvm/clang/test/Frontend/verify-ignore-unexpected.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

82 lines
3.5 KiB
C

// RUN: not %clang_cc1 -DTEST_SWITCH -verify-ignore-unexpected=remark,aoeu,note -verify %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-BAD-SWITCH %s
#ifdef TEST_SWITCH
// expected-no-diagnostics
#endif
// CHECK-BAD-SWITCH: error: 'expected-error' diagnostics seen but not expected:
// CHECK-BAD-SWITCH-NEXT: (frontend): invalid value 'aoeu' in '-verify-ignore-unexpected='
// RUN: %clang_cc1 -DTEST1 -verify %s
// RUN: %clang_cc1 -DTEST1 -verify -verify-ignore-unexpected %s
#ifdef TEST1
#warning MyWarning1
// expected-warning@-1 {{MyWarning1}}
int x; // expected-note {{previous definition is here}}
float x; // expected-error {{redefinition of 'x'}}
#endif
// RUN: not %clang_cc1 -DTEST2 -verify %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-UNEXP %s
// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected= %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-UNEXP %s
// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected=note %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-NOTE %s
// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected=warning %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-WARN %s
// RUN: not %clang_cc1 -DTEST2 -verify -verify-ignore-unexpected=error %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-ERR %s
#ifdef TEST2
#warning MyWarning2
int x;
float x;
#endif
// CHECK-UNEXP: no expected directives found
// CHECK-UNEXP-NEXT: 'expected-error' diagnostics seen but not expected
// CHECK-UNEXP-NEXT: Line {{[0-9]+}}: redefinition of 'x'
// CHECK-UNEXP-NEXT: 'expected-warning' diagnostics seen but not expected
// CHECK-UNEXP-NEXT: Line {{[0-9]+}}: MyWarning2
// CHECK-UNEXP-NEXT: 'expected-note' diagnostics seen but not expected
// CHECK-UNEXP-NEXT: Line {{[0-9]+}}: previous definition is here
// CHECK-UNEXP-NEXT: 4 errors generated.
// CHECK-NOTE: no expected directives found
// CHECK-NOTE-NEXT: 'expected-error' diagnostics seen but not expected
// CHECK-NOTE-NEXT: Line {{[0-9]+}}: redefinition of 'x'
// CHECK-NOTE-NEXT: 'expected-warning' diagnostics seen but not expected
// CHECK-NOTE-NEXT: Line {{[0-9]+}}: MyWarning2
// CHECK-NOTE-NEXT: 3 errors generated.
// CHECK-WARN: no expected directives found
// CHECK-WARN-NEXT: 'expected-error' diagnostics seen but not expected
// CHECK-WARN-NEXT: Line {{[0-9]+}}: redefinition of 'x'
// CHECK-WARN-NEXT: 'expected-note' diagnostics seen but not expected
// CHECK-WARN-NEXT: Line {{[0-9]+}}: previous definition is here
// CHECK-WARN-NEXT: 3 errors generated.
// CHECK-ERR: no expected directives found
// CHECK-ERR-NEXT: 'expected-warning' diagnostics seen but not expected
// CHECK-ERR-NEXT: Line {{[0-9]+}}: MyWarning2
// CHECK-ERR-NEXT: 'expected-note' diagnostics seen but not expected
// CHECK-ERR-NEXT: Line {{[0-9]+}}: previous definition is here
// CHECK-ERR-NEXT: 3 errors generated.
// RUN: not %clang_cc1 -DTEST3 -verify -verify-ignore-unexpected %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-EXP %s
#ifdef TEST3
// expected-error {{test3}}
#endif
// CHECK-EXP: 'expected-error' diagnostics expected but not seen
// CHECK-EXP-NEXT: Line {{[0-9]+}}: test3
// RUN: not %clang_cc1 -DTEST4 -verify -verify-ignore-unexpected %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-NOEXP %s
// RUN: not %clang_cc1 -DTEST4 -verify -verify-ignore-unexpected=warning,error,note %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-NOEXP %s
#ifdef TEST4
#warning MyWarning4
int x;
float x;
#endif
// CHECK-NOEXP: error: no expected directives found
// CHECK-NOEXP-NEXT: 1 error generated