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
57 lines
1.9 KiB
Objective-C
57 lines
1.9 KiB
Objective-C
// RUN: %clang_cc1 -fobjc-arc -isystem %S/Inputs %s -DNO_USE
|
|
// RUN: %clang_cc1 -fobjc-arc -isystem %S/Inputs %s -verify
|
|
|
|
#include <arc-system-header.h>
|
|
|
|
#ifndef NO_USE
|
|
void test(id op, void *cp) {
|
|
cp = test0(op); // expected-error {{'test0' is unavailable in ARC}}
|
|
cp = *test1(&op); // expected-error {{'test1' is unavailable in ARC}}
|
|
// expected-note@arc-system-header.h:1 {{inline function performs a conversion which is forbidden in ARC}}
|
|
// expected-note@arc-system-header.h:5 {{inline function performs a conversion which is forbidden in ARC}}
|
|
}
|
|
|
|
void test3(struct Test3 *p) {
|
|
p->field = 0; // expected-error {{'field' is unavailable in ARC}}
|
|
// expected-note@arc-system-header.h:14 {{declaration uses type that is ill-formed in ARC}}
|
|
}
|
|
|
|
void test4(Test4 *p) {
|
|
p->field1 = 0; // expected-error {{'field1' is unavailable in ARC}}
|
|
// expected-note@arc-system-header.h:19 {{declaration uses type that is ill-formed in ARC}}
|
|
p->field2 = 0;
|
|
}
|
|
|
|
void test5(struct Test5 *p) {
|
|
p->field = 0;
|
|
}
|
|
|
|
id test6(void) {
|
|
// This is actually okay to use if declared in a system header.
|
|
id x;
|
|
x = (id) kMagicConstant;
|
|
x = (id) (x ? kMagicConstant : kMagicConstant);
|
|
x = (id) (x ? kMagicConstant : (void*) 0);
|
|
|
|
extern void test6_helper(void);
|
|
x = (id) (test6_helper(), kMagicConstant);
|
|
}
|
|
|
|
void test7(Test7 *p) {
|
|
*p.prop = 0; // expected-error {{'prop' is unavailable in ARC}}
|
|
p.prop = 0; // expected-error {{'prop' is unavailable in ARC}}
|
|
*[p prop] = 0; // expected-error {{'prop' is unavailable in ARC}}
|
|
[p setProp: 0]; // expected-error {{'setProp:' is unavailable in ARC}}
|
|
// expected-note@arc-system-header.h:41 4 {{declaration uses type that is ill-formed in ARC}}
|
|
// expected-note@arc-system-header.h:41 2 {{property 'prop' is declared unavailable here}}
|
|
}
|
|
|
|
extern void doSomething(Test9 arg);
|
|
void test9(void) {
|
|
Test9 foo2 = {0, 0};
|
|
doSomething(foo2);
|
|
}
|
|
#endif
|
|
|
|
// test8 in header
|