[PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 19 11:03:07 PST 2016


Anastasia added inline comments.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:5046
@@ +5045,3 @@
+  if (D->hasAttr<OpenCLAccessAttr>()) {
+    S.Diag(Attr.getLoc(), diag::err_opencl_multiple_access_qualifiers)
+        << D->getSourceRange();
----------------
Yes, I think attribute would make more sense.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:5061
@@ +5060,3 @@
+      if (S.getLangOpts().OpenCLVersion < 200 || DeclTy->isPipeType()) {
+        S.Diag(Attr.getLoc(), diag::err_opencl_invalid_read_write)
+            << PDecl->getType() << DeclTy->isImageType();
----------------
Yes, w/o this attribute it would assume default access qualifier i.e. read_only. So I agree to point to the attribute here too.


http://reviews.llvm.org/D16040





More information about the cfe-commits mailing list