[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r295307! https://reviews.llvm.org/D29764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. Please fix the test. Otherwise LGTM. Thanks! https://reviews.llvm.org/D29764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D29764#673679, @yaxunl wrote: > In https://reviews.llvm.org/D29764#673548, @Nicola wrote: > > > Looking at "Example 4" in the standard it looks like this should also be > > illegal. > > > > int (^block1)(void) = ^int {return 1;}; > >

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D29764#673548, @Nicola wrote: > Looking at "Example 4" in the standard it looks like this should also be > illegal. > > int (^block1)(void) = ^int {return 1;}; > int foo() { return block1(); } > > __kernel void k(global int *z) > { >

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-10 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment. Looking at "Example 4" in the standard it looks like this should also be illegal. int (^block1)(void) = ^int {return 1;}; int foo() { return block1(); } __kernel void k(global int *z) { int (^block2)(void) = ^int { return foo(); // expected-error

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Herald added a subscriber: yaxunl. Adding the last restriction from s6.12.5 OpenCL C v2.0. "A Block cannot reference or capture another Block variable declared in the outer scope". https://reviews.llvm.org/D29764 Files: