1 // RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks -std=c++1y
3 extern "C" int exit(int);
10 int main (int argc
, const char * argv
[]) {
13 BobTheStruct (^copyStruct
)(BobTheStruct
);
17 inny
.ps
[i
] = i
* i
* i
;
18 inny
.qs
[i
] = -i
* i
* i
;
21 copyStruct
= ^(BobTheStruct aBigStruct
){ return aBigStruct
; }; // pass-by-value intrinsically copies the argument
23 outty
= copyStruct(inny
);
25 if ( &inny
== &outty
) {
29 if ( (inny
.ps
[i
] != outty
.ps
[i
]) || (inny
.qs
[i
] != outty
.qs
[i
]) ) {
37 namespace rdar8134521
{
39 int (^P
)(int) = reinterpret_cast<int(^)(int)>(1);
42 P
= reinterpret_cast<int(^)(int)>((void*)1);
43 P
= (int(^)(int))((void*)1);
47 namespace rdar11055105
{
52 template <class T
> void foo(T
&x
) noexcept(noexcept(x
.foo()));
60 namespace LocalDecls
{
63 extern int a
; // expected-note {{previous}}
64 extern int b(); // expected-note {{previous}}
69 extern float a
; // expected-error {{different type}}
70 extern float b(); // expected-error {{cannot be overloaded}}