mirror-llvm-project/libsycl/docs/CodingGuidelines.md
Reid Kleckner 93b1240309
[docs] Finish misc MyST migration (#210209)
Tracking issue: #201242
See the [migration guide] for more information.

[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines

This is a stacked PR based on #210208, which is the standalone rename
commit for this miscellaneous Markdown migration batch.

This was prepared with rst2myst plus LLM-assisted cleanup. LLDB man
pages are intentionally left as reStructuredText because LLDB man-page
building should not take on Markdown parser dependencies.

Unfortunately, many of these miscellaneous docs do not have working
standalone doc build targets, so I was not able to render HTML for all
of them. I think the scope is small enough that this is reviewable by
hand.
2026-07-17 11:56:59 -07:00

33 lines
1.1 KiB
Markdown

# Libsycl Coding Standards
:::{contents}
:local: true
:::
## Introduction
The `libsycl` project follows the
[LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html) with
exceptions as described in this document.
### Naming
#### Names of Macros, Types, Functions, Variables, and Enumerators
Entities specified by the SYCL specification are named as required by the SYCL
specification. Names of all other entities follow the guidance in the LLVM
Coding Standards.
#### Names of Files and Directories
- **Directory Names** should be in snake case (e.g. `test_e2e`) except in
cases where LLVM project wide conventions are used. For example, LIT tests
often use an `Inputs` directory to hold files that are used by tests but
that should be excluded from test discovery.
- **File Names in snake case** should be used for all C++ implementation files.
For example files in directories `include`, `src`, `test`, `utils`,
and `tools` should be named in snake case.
- **File Names in camel case** should be used for most other files. For example
files in directories `cmake/modules` and `docs` should be named in camel
case.