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
77 lines
1.9 KiB
Plaintext
77 lines
1.9 KiB
Plaintext
// RUN: %clang_cc1 -E %s -o %t.mm
|
|
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
|
|
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
|
|
|
|
typedef unsigned long size_t;
|
|
|
|
void I( void (^)(void));
|
|
void (^noop)(void);
|
|
|
|
void nothing();
|
|
int printf(const char*, ...);
|
|
|
|
typedef void (^T) (void);
|
|
|
|
void takeblock(T);
|
|
int takeintint(int (^C)(int)) { return C(4); }
|
|
|
|
T somefunction() {
|
|
if (^{ })
|
|
nothing();
|
|
|
|
noop = ^{};
|
|
|
|
noop = ^{printf("\nClosure\n"); };
|
|
|
|
I(^{ });
|
|
|
|
return ^{printf("\nClosure\n"); };
|
|
}
|
|
void test2() {
|
|
int x = 4;
|
|
|
|
takeblock(^{ printf("%d\n", x); });
|
|
|
|
while (1) {
|
|
takeblock(^{
|
|
while(1) break; // ok
|
|
});
|
|
break;
|
|
}
|
|
}
|
|
|
|
void test4() {
|
|
void (^noop)(void) = ^{};
|
|
void (*noop2)() = 0;
|
|
}
|
|
|
|
void myfunc(int (^block)(int)) {}
|
|
|
|
void myfunc3(const int *x);
|
|
|
|
void test5() {
|
|
int a;
|
|
|
|
myfunc(^(int abcd) {
|
|
myfunc3(&a);
|
|
return 1;
|
|
});
|
|
}
|
|
|
|
void *X;
|
|
|
|
static int global_x = 10;
|
|
void (^global_block)(void) = ^{ printf("global x is %d\n", global_x); };
|
|
|
|
// CHECK: static __global_block_block_impl_0 __global_global_block_block_impl_0((void *)__global_block_block_func_0, &__global_block_block_desc_0_DATA);
|
|
// CHECK: void (*global_block)(void) = ((void (*)())&__global_global_block_block_impl_0);
|
|
|
|
typedef void (^void_block_t)(void);
|
|
|
|
static const void_block_t myBlock = ^{ };
|
|
|
|
static const void_block_t myBlock2 = ^ void(void) { };
|