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
58 lines
3.0 KiB
C++
58 lines
3.0 KiB
C++
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
|
|
|
|
int i __attribute__((speculative_load_hardening)); // expected-error {{'speculative_load_hardening' attribute only applies to functions}}
|
|
|
|
void f1() __attribute__((speculative_load_hardening));
|
|
void f2() __attribute__((speculative_load_hardening(1))); // expected-error {{'speculative_load_hardening' attribute takes no arguments}}
|
|
|
|
template <typename T>
|
|
void tf1() __attribute__((speculative_load_hardening));
|
|
|
|
int f3(int __attribute__((speculative_load_hardening)), int); // expected-error {{'speculative_load_hardening' attribute only applies to functions}}
|
|
|
|
struct A {
|
|
int f __attribute__((speculative_load_hardening)); // expected-error {{'speculative_load_hardening' attribute only applies to functions}}
|
|
void mf1() __attribute__((speculative_load_hardening));
|
|
static void mf2() __attribute__((speculative_load_hardening));
|
|
};
|
|
|
|
void f4() __attribute__((no_speculative_load_hardening, speculative_load_hardening)); // expected-error {{attributes are not compatible}}
|
|
// expected-note@-1 {{conflicting attribute is here}}
|
|
|
|
void f5() __attribute__((speculative_load_hardening, no_speculative_load_hardening)); // expected-error {{attributes are not compatible}}
|
|
// expected-note@-1 {{conflicting attribute is here}}
|
|
|
|
void f6() __attribute__((no_speculative_load_hardening)); // expected-note {{conflicting attribute is here}}
|
|
|
|
void f6() __attribute__((speculative_load_hardening)); // expected-error {{'speculative_load_hardening' and 'no_speculative_load_hardening' attributes are not compatible}}
|
|
|
|
int ci [[clang::speculative_load_hardening]]; // expected-error {{'clang::speculative_load_hardening' attribute only applies to functions}}
|
|
|
|
[[clang::speculative_load_hardening]] void cf1();
|
|
[[clang::speculative_load_hardening(1)]] void cf2(); // expected-error {{'clang::speculative_load_hardening' attribute takes no arguments}}
|
|
|
|
template <typename T>
|
|
[[clang::speculative_load_hardening]]
|
|
void ctf1();
|
|
|
|
int cf3(int c[[clang::speculative_load_hardening]], int); // expected-error {{'clang::speculative_load_hardening' attribute only applies to functions}}
|
|
|
|
struct CA {
|
|
int f [[clang::speculative_load_hardening]]; // expected-error {{'clang::speculative_load_hardening' attribute only applies to functions}}
|
|
[[clang::speculative_load_hardening]] void mf1();
|
|
[[clang::speculative_load_hardening]] static void mf2();
|
|
};
|
|
|
|
[[clang::speculative_load_hardening, clang::no_speculative_load_hardening]] void cf4(); // expected-error {{attributes are not compatible}}
|
|
// expected-note@-1 {{conflicting attribute is here}}
|
|
|
|
[[clang::no_speculative_load_hardening, clang::speculative_load_hardening]] void cf5(); // expected-error {{attributes are not compatible}}
|
|
// expected-note@-1 {{conflicting attribute is here}}
|
|
|
|
[[clang::speculative_load_hardening]]
|
|
void cf6(); // expected-note@-1 {{conflicting attribute is here}}
|
|
|
|
[[clang::no_speculative_load_hardening]]
|
|
void cf6(); // expected-error@-1 {{'clang::no_speculative_load_hardening' and 'clang::speculative_load_hardening' attributes are not compatible}} \
|
|
|