[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / block-storageclass.c
blobeb7c985dbf5bb269f1e3ac725ddfa3a5bb23396c
1 // RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
2 // expected-no-diagnostics
4 int printf(const char *, ...);
5 void _Block_byref_release(void*src){}
7 int main(void) {
8 __block int X = 1234;
9 __block const char * message = "HELLO";
11 X = X - 1234;
13 X += 1;
15 printf ("%s(%d)\n", message, X);
16 X -= 1;
18 return X;