intel / intel/llvm

SYCL headers using unreserved identifiers

Open
#3,677 5 comments 0 reactions 0 assignees View on GitHub
bug confirmed
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

Looking through the SYCL headers, I can't help but notice that it makes *heavy* use of unreserved identifiers in places where reserved identifiers should be used. The SYCL headers are part of the implementation of DPC++ and thus are allowed to use reserved identifiers (similar to the STL or C standard library). We should make use of that allowance to provide a better user experience.

Specifically, any non-public part of the API should be using a reserved identifier. This includes: parameter names, identifiers in `template<>` parameter lists, anything that's in a `details` namespace (including the `details` namespace itself), private and protected data members and function names, etc.

This is important for a production-quality library so that it does not conflict with identifiers that should be available to the user. While many of the identifiers feel like they should be safe to use (because they're inside of a namespace), users still define macros and those will cause breakages when including the SYCL headers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.