[PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr
Xiuli PAN via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 5 18:49:28 PST 2016
pxli168 added inline comments.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:5067
@@ +5066,3 @@
+ if (DeclTy->isPipeType() ||
+ (S.getLangOpts().OpenCLVersion < 200 && DeclTy->isImageType())) {
+ S.Diag(D->getLocation(), diag::err_opencl_invalid_read_write)
----------------
Anastasia wrote:
> pxli168 wrote:
> > I used arc to update the patch and it case some line error.
> > I have check about OpenCL version here and will handle the read_write with image before OpenCL 2.0. As spec mentioned that it is reversed before OpenCL 2.0.
> Do you think we could just check:
> if (S.getLangOpts().OpenCLVersion < 200 || DeclTy->isPipeType())
It seems can work, but maybe mislead to others.
But with the comment above it seems ok.
http://reviews.llvm.org/D16040
More information about the cfe-commits
mailing list