[Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interc...
[blocksruntime.git] / test / BlocksRuntime / copynull.c
blobc49e499f3ab65ad728dd8373c493e54d3d18ab78
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
7 /*
8 * copynull.c
9 * testObjects
11 * Created by Blaine Garst on 10/15/08.
15 #import <stdio.h>
16 #import <Block.h>
17 #import <Block_private.h>
19 // CONFIG rdar://6295848
21 int main(int argc, char *argv[]) {
23 void (^block)(void) = (void (^)(void))0;
24 void (^blockcopy)(void) = Block_copy(block);
26 if (blockcopy != (void (^)(void))0) {
27 printf("whoops, somehow we copied NULL!\n");
28 return 1;
30 // make sure we can also
31 Block_release(blockcopy);
32 // and more secretly
33 //_Block_destroy(blockcopy);
35 printf("%s: success\n", argv[0]);
36 return 0;