Files
TheRock/compiler/amd-llvm/clang/test/SemaObjC/attr-suppress.m
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

46 lines
1.2 KiB
Objective-C

// RUN: %clang_cc1 -fsyntax-only -fblocks %s -verify
#define SUPPRESS1 __attribute__((suppress))
#define SUPPRESS2(...) __attribute__((suppress(__VA_ARGS__)))
SUPPRESS1 int global = 42;
SUPPRESS1 void foo() {
SUPPRESS1 int *p; // no-warning
SUPPRESS1 int a = 0; // no-warning
SUPPRESS2()
int b = 1; // no-warning
SUPPRESS2("a")
int c = a + b; // no-warning
SUPPRESS2("a", "b") { b = c - a; } // no-warning
SUPPRESS2("a", "b")
if (b == 10)
a += 4; // no-warning
SUPPRESS1 while (1) {} // no-warning
SUPPRESS1 switch (a) { // no-warning
default:
c -= 10;
}
// GNU-style attributes and C++11 attributes apply to different things when
// written like this. GNU attribute gets attached to the declaration, while
// C++11 attribute ends up on the type.
int SUPPRESS2("r") z; // no-warning
SUPPRESS2(foo) // no-warning
float f;
// expected-error@-2 {{expected string literal as argument of 'suppress' attribute}}
}
union SUPPRESS2("type.1") U { // no-warning
int i;
float f;
};
SUPPRESS1 @interface Test { // no-warning
}
@property SUPPRESS2("prop") int *prop; // no-warning
- (void)bar:(int)x SUPPRESS1; // no-warning
@end