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
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
http://lists
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;};
> > int
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)
> {
>
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 {{canno
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:
include/clang/Basic/DiagnosticSemaKind