[AA] Rename CaptureInfo -> CaptureAnalysis (NFC) (#116842)
[llvm-project.git] / compiler-rt / test / BlocksRuntime / copynull.c
blob478e300d4f0e574a5e37e5cd855736cbe38ab0ef
1 //
2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 /*
7 * copynull.c
8 * testObjects
10 * Created by Blaine Garst on 10/15/08.
14 #import <stdio.h>
15 #import <Block.h>
16 #import <Block_private.h>
18 // CONFIG rdar://6295848
20 int main(int argc, char *argv[]) {
22 void (^block)(void) = (void (^)(void))0;
23 void (^blockcopy)(void) = Block_copy(block);
25 if (blockcopy != (void (^)(void))0) {
26 printf("whoops, somehow we copied NULL!\n");
27 return 1;
29 // make sure we can also
30 Block_release(blockcopy);
31 // and more secretly
32 //_Block_destroy(blockcopy);
34 printf("%s: success\n", argv[0]);
35 return 0;