2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2008-09-19 00:44:58 +08:00
|
|
|
|
2009-11-17 16:57:36 +08:00
|
|
|
int printf(const char *, ...);
|
2008-09-19 00:44:58 +08:00
|
|
|
void _Block_byref_release(void*src){}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
__block int X = 1234;
|
|
|
|
__block const char * message = "HELLO";
|
|
|
|
|
|
|
|
X = X - 1234;
|
|
|
|
|
|
|
|
X += 1;
|
|
|
|
|
|
|
|
printf ("%s(%d)\n", message, X);
|
|
|
|
X -= 1;
|
|
|
|
|
|
|
|
return X;
|
|
|
|
}
|