[PATCH] D21904: [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of 'target data'

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 20:41:09 PDT 2016


ABataev added inline comments.

================
Comment at: lib/Sema/SemaOpenMP.cpp:11377
@@ +11376,3 @@
+    // item should be a pointer or array
+    if (!Type.getNonReferenceType()->isPointerType()) {
+      Diag(ELoc, diag::err_omp_usedeviceptr_not_a_pointer)
----------------
sfantao wrote:
> ABataev wrote:
> > You should not skip the reference from the type, references are not allowed also
> Hi Alexey, I think the item can be a reference to a pointer. I couldn't find that restriction in the spec,  can you point me to what you are referring to? We should probably refer to that in the preceding comment. 
> 
> Thanks!
Here is the restriction:
"2.10.1 target data Construct, restrictions. References in the construct to a list item that appears in a use_device_ptr clause must be to the address of the list item."
Does it mean that references are allowed?


Repository:
  rL LLVM

http://reviews.llvm.org/D21904





More information about the cfe-commits mailing list