Skip to content

Add clang tidy - #420

Open
charles-lunarg wants to merge 13 commits into
KhronosGroup:mainfrom
charles-lunarg:add_clang_tidy
Open

charles-lunarg wants to merge 13 commits into
KhronosGroup:mainfrom
charles-lunarg:add_clang_tidy

Conversation

@charles-lunarg

Copy link
Copy Markdown
Collaborator

No description provided.

@charles-lunarg
charles-lunarg force-pushed the add_clang_tidy branch 5 times, most recently from 05bb9b0 to 3c1ac14 Compare October 5, 2026 22:08
Header and Source file used different parameter names, unified them
to share a name for readability.
The API takes things by single pointer but many tests are passing a
double pointer. Make it explicit by using the appropriate cast.
Bad style to have an assignment occurring inside of a conditional.
This prevents accidental conversions from taking place.
Move operators should never throw.
Signed bitwise ops can be confusing and is easy to invoke undefined
behavior.
Adds the CMake build option USE_CLANG_TIDY that enables clang-tidy
checks. The .clang-tidy file configures the settings to apply everywhere
while the tests/.clang-tidy only applies to the tests, that way nuisance
checks can be disabled for tests (such as const correctness).

format.yml was renamed to lint.yml as it now contains a step to run
the project with clang-tidy enabled.
VkClusterAccelerationStructureOpInputNV is a union of pointers, and the safe struct
has special functionality for handling unions of pointers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant