llvm-project/clang/test/SemaOpenCLCXX
Anastasia Stulova 6064f426a1 [OpenCL] Restrict addr space conversions in nested pointers
Address space conversion changes pointer representation.
This commit disallows such conversions when they are not
legal i.e. for the nested pointers even with compatible
address spaces. Because the address space conversion in
the nested levels can't be generated to modify the pointers
correctly. The behavior implemented is as follows:

- Any implicit conversions of nested pointers with different
  address spaces is rejected.
- Any conversion of address spaces in nested pointers in safe
  casts (e.g. const_cast or static_cast) is rejected.
- Conversion in low level C-style or reinterpret_cast is accepted
  but with a warning (this aligns with OpenCL C behavior).

Fixes PR39674

Differential Revision: https://reviews.llvm.org/D73360
2020-02-07 12:04:35 +00:00
..
address-space-castoperators.cl [OpenCL] Restrict addr space conversions in nested pointers 2020-02-07 12:04:35 +00:00
address-space-cond.cl Clean up and slightly generalize implementation of composite pointer 2020-01-10 16:12:00 -08:00
address-space-deduction.cl [OpenCL] Restrict addr space conversions in nested pointers 2020-02-07 12:04:35 +00:00
address-space-lambda.cl Make address-space-lambda.cl pass on 32-bit Windows 2020-01-24 20:35:25 +01:00
address-space-of-this-class-scope.cl [Sema] Improve diagnostic about addr spaces for overload candidates 2019-12-13 12:35:18 +00:00
address-space-of-this.cl [OpenCL] Rename lang mode flag for C++ mode 2019-07-25 11:04:29 +00:00
address-space-references.cl [OpenCL] Restrict addr space conversions in nested pointers 2020-02-07 12:04:35 +00:00
address-space-templates.cl [OpenCL] Pretty print __private addr space 2019-12-27 13:42:07 +00:00
address_space_overloading.cl [OpenCL] Rename lang mode flag for C++ mode 2019-07-25 11:04:29 +00:00
addrspace-auto.cl [OpenCL] Pretty print __private addr space 2019-12-27 13:42:07 +00:00
kernel_invalid.cl [OpenCL] Rename lang mode flag for C++ mode 2019-07-25 11:04:29 +00:00
method-overload-address-space.cl [OpenCL] Rename lang mode flag for C++ mode 2019-07-25 11:04:29 +00:00
newdelete.cl [OpenCL] Rename lang mode flag for C++ mode 2019-07-25 11:04:29 +00:00
private-access-specifier.cpp [PR41247] Fixed parsing of private keyword in C++. 2019-03-28 11:47:14 +00:00
restricted.cl [OpenCL] Move addr space deduction to Sema. 2019-11-27 12:44:42 +00:00