llvm
a9bc54a2 - [SYCL][Doc] Specify that invalid host_access_enum values are ill-formed (#21445)

Commit
6 days ago
[SYCL][Doc] Specify that invalid host_access_enum values are ill-formed (#21445) Currently code like this is accepted by DPC++: ```cpp device_global<int, decltype(host_access_key::value_t<static_cast<host_access_enum>(42)>)> var; ``` and results in the generated SPIR-V with a `HostAccess` property set to 42, which is not a valid value. In another change I'm looking to make this an error in some *but not all*, cases, but nothing in the spec currently prohibits this code in my reading. Add a sentence to make it ill-formed, no diagnostic required. We could make it a required hard error, but that is surprisingly difficult to implement for little benefit: in practice I don't expect any users to be actually doing this.
Author
Parents
Loading