Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-07-12 Thread Anastasia Stulova via cfe-commits
Anastasia closed this revision. Anastasia added a comment. r262616 http://reviews.llvm.org/D16928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-22 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. This revision is now accepted and ready to land. Then there will be no problem. I will change my patches as well. LGTM! Thanks. http://reviews.llvm.org/D16928 ___ cfe-commits mailing list cfe-

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-22 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Yes, that's right. In this commit I assume parser has already accepted the blocks. We currently accept them if -fblocks is passed. I think we should also accept blocks by default with CL2.0. But I am thinking not to restrict passing -fblocks with earlier CL version.

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-21 Thread Xiuli PAN via cfe-commits
pxli168 requested changes to this revision. pxli168 added a comment. This revision now requires changes to proceed. It seems this patch will check block for CL1.2 or eailer? But the spec reference is for OpenCL v2.0. http://reviews.llvm.org/D16928

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-20 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. This revision is now accepted and ready to land. LGTM! Thanks http://reviews.llvm.org/D16928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-20 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. LGTM! Thanks. http://reviews.llvm.org/D16928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 48514. Anastasia added a comment. Removed varargs due to printf special handling. To be added as a separate review! http://reviews.llvm.org/D16928 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-19 Thread Mats Petersson via cfe-commits
MatsPetersson added a comment. @Anastasia: Yes, I agree, printf should be done as a separate patch. http://reviews.llvm.org/D16928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. @Mats, I think I would prefer not to add even more special handling (i.e. error in this case) for printf. I will look into adding it as a Builtin instead. However, I would prefer to remove it from this change and submit a separate patch as it doesn't belong to Clang

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-18 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. @Mats, I think I would prefer not to add even more special handling (i.e. error in this case) for printf. I will look into adding it as a Builtin instead. However, I would prefer to remove it from this change and submit a separate patch as it doesn't belong to Clang

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-17 Thread Mats Petersson via cfe-commits
MatsPetersson added a comment. I think adding printf as a builtin function is a good idea. If not, I feel that the error message should distinguish between (for example): int printf(global char* fmt, ...); and void myfunc(int n, ...); since the former is "incorrect prototype of printf" an

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-17 Thread Anastasia Stulova via cfe-commits
Anastasia updated this revision to Diff 48219. Anastasia added a comment. Drafted code for printf handling. Made me think about: 1. How much signature check should we do i.e. should we check the pointer AS itself (generic for CL2.0, any other otherwise) or qualifiers being used for the first p

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-16 Thread Mats Petersson via cfe-commits
MatsPetersson added inline comments. Comment at: test/SemaOpenCL/invalid-func.cl:6 @@ +5,2 @@ +void foo(int, ...); // expected-error{{OpenCL does not allow variadic arguments}} +int printf(const char *, ...); pekka.jaaskelainen wrote: > I wonder should we check f

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-16 Thread Mats Petersson via cfe-commits
MatsPetersson added a subscriber: MatsPetersson. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7700 @@ -7698,2 +7699,3 @@ + "OpenCL does not allow variadic arguments">; // OpenCL v2.0 s6.13.6 -- Builtin Pipe Functions Looks good Comm

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-16 Thread Pekka Jääskeläinen via cfe-commits
pekka.jaaskelainen added inline comments. Comment at: test/SemaOpenCL/invalid-func.cl:6 @@ +5,2 @@ +void foo(int, ...); // expected-error{{OpenCL does not allow variadic arguments}} +int printf(const char *, ...); I wonder should we check for the fingerprint too

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-12 Thread Anastasia Stulova via cfe-commits
Anastasia removed rL LLVM as the repository for this revision. Anastasia updated this revision to Diff 47823. Anastasia added a comment. Update according to review comments! http://reviews.llvm.org/D16928 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/Sem

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDecl.cpp:13011 @@ -12978,5 +13010,3 @@ - // OpenCL 1.2 spec, s6.9 r: - // The event type cannot be used to declare a structure or union field. - if (LangOpts.OpenCL && T->isEventT()) { -Diag(Loc, diag::err_event_t_st

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-05 Thread Mats Petersson via cfe-commits
Leporacanthicus added a subscriber: Leporacanthicus. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7684 @@ +7683,3 @@ + "the __block storage type is not permitted">; + +def err_opencl_variadic_prototype_not_allowed : Error< Is this blank line there for a

[PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-05 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added reviewers: pekka.jaaskelainen, pxli168. Anastasia added a subscriber: cfe-commits. Anastasia set the repository for this revision to rL LLVM. Applying the following restrictions for block variables in OpenCL (v2.0 s6.12.5): - __block storage class