Skip to content

Commit 1445528

Browse files
authored
[SYCL][Docs] Add new rule for naming C++ identifiers in SYCL project (#5843)
This adds a new rule of naming C++ identifiers in `llvm/sycl` files. It aims to exclude possibility to fail SYCL app compilation by defining macros before including `CL/sycl.hpp`.
1 parent 3938c35 commit 1445528

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sycl/doc/developer/ContributeToDPCPP.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ end-to-end or SYCL-CTS tests.
6262
- Add a helpful comment describing what the test does at the beginning and
6363
other comments throughout the test as necessary.
6464

65+
- All identifiers used in `llvm/sycl` headers files must contain at
66+
least one lowercase letter due to avoid conflicts with user-defined macros.
67+
6568
- Try to follow descriptive naming convention for variables, functions as
6669
much as possible. Please refer to
6770
[LLVM naming convention](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)

0 commit comments

Comments
 (0)