kkwli0 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:
> > 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?
> Ok, thanks. My interpretation is that that restriction refers to references 
> used in clauses (in the same construct) other than use_device_ptr to 
> declarations used in use_device_ptr. I think the motivation is to restrict 
> the use of the value of the pointer  by other clauses given that value is 
> going to change for that data environment because of the behavior implemented 
> by use_device_ptr. Carlo, what is your interpretation?
I interpret the rule to the list item being used inside the construct instead 
of being used in the other clauses on the same construct.


Repository:
  rL LLVM

http://reviews.llvm.org/D21904



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to