[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 26 07:55:31 PDT 2018


Anastasia created this revision.
Anastasia added reviewers: rjmccall, yaxunl.

I first enabled AS deduction for references that allowed to inherit the right conversion diagnostics based on qualification conversion rules implemented earlier for the pointer type.

Then in order to tests the deduction rules fully, I had to enable some extra features from OpenCL 2.0 that are also valid in C++.

A number of ICEs fired in the `CodeGen` due to missing `addrspacecast`. Not convinced the current solution is good though. May be it would be cleaner to add a separate `CastKind` here - `CK_LValueAddressSpaceConversion`? Although I am not entirely clear about the benefits yet.


https://reviews.llvm.org/D53764

Files:
  lib/AST/Expr.cpp
  lib/CodeGen/CGExpr.cpp
  lib/Sema/DeclSpec.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaInit.cpp
  lib/Sema/SemaType.cpp
  test/CodeGenOpenCLCXX/address-space-deduction.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53764.171306.patch
Type: text/x-patch
Size: 9080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181026/c262da2d/attachment-0001.bin>


More information about the cfe-commits mailing list