[OpenCL] Add as_size/ptrdiff/intptr/uintptr_t operators
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 7 Apr 2021 09:16:41 +0000 (10:16 +0100)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 7 Apr 2021 09:16:41 +0000 (10:16 +0100)
commit35bc7569f8ad8e76d36560386bbc45ca40716410
treef8e8e6ee5de38f27fe4d12cc31c02c22039540d9
parent792ee5be36926bca22291cc93595cf65d0cd6985
[OpenCL] Add as_size/ptrdiff/intptr/uintptr_t operators

size_t and friends are built-in scalar data types and s6.4.4.2 of the
OpenCL C Specification says the as_type() operator must be available
for these data types.

Differential Revision: https://reviews.llvm.org/D98959
clang/lib/Headers/opencl-c-base.h
clang/test/SemaOpenCL/as_type.cl