xref: /llvm-project/compiler-rt/test/BlocksRuntime/josh.C (revision 2946cd701067404b99c39fb29dc9c74bd7193eb3)
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
5 
6 // CONFIG C++ GC RR open rdar://6347910
7 
8 
9 
10 struct MyStruct {
11     int something;
12 };
13 
14 struct TestObject {
15 
testTestObject16         void test(void){
17             {
18                 MyStruct first;   // works
19             }
20             void (^b)(void) = ^{
21                 MyStruct inner;  // fails to compile!
22             };
23         }
24 };
25 
26 
27 
main(int argc,char * argv[])28 int main(int argc, char *argv[]) {
29     printf("%s: Success\n", argv[0]);
30     return 0;
31 }
32