[Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interc...
[blocksruntime.git] / test / BlocksRuntime / nestedimport.c
blobe8066922fbba214debe6a75b3e459c287dfaa2af
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 // nestedimport.m
9 // testObjects
11 // Created by Blaine Garst on 6/24/08.
13 // pure C nothing more needed
14 // CONFIG
17 #include <stdio.h>
18 #include <stdlib.h>
21 int Global = 0;
23 void callVoidVoid(void (^closure)(void)) {
24 closure();
27 int main(int argc, char *argv[]) {
28 int i = 1;
30 void (^vv)(void) = ^{
31 if (argc > 0) {
32 callVoidVoid(^{ Global = i; });
36 i = 2;
37 vv();
38 if (Global != 1) {
39 printf("%s: error, Global not set to captured value\n", argv[0]);
40 exit(1);
42 printf("%s: success\n", argv[0]);
43 return 0;