annotate clang/test/Sema/block-storageclass.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
anatofuz
parents:
diff changeset
2 // expected-no-diagnostics
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 int printf(const char *, ...);
anatofuz
parents:
diff changeset
5 void _Block_byref_release(void*src){}
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 int main() {
anatofuz
parents:
diff changeset
8 __block int X = 1234;
anatofuz
parents:
diff changeset
9 __block const char * message = "HELLO";
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 X = X - 1234;
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 X += 1;
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 printf ("%s(%d)\n", message, X);
anatofuz
parents:
diff changeset
16 X -= 1;
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 return X;
anatofuz
parents:
diff changeset
19 }