You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though we run clang-tidy in the debug preset, some targets (like benchmarks) force-enable optimization flags or otherwise disable assertions. Since clang-tidy isn't running any code, we should make sure it sees all code regardless of optimization level. This should help reduce false positives around _CCCL_ASSERT() and friends.
Checklist
New or existing tests cover these changes.
The documentation is up to date with these changes.
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Chores
Updated static analysis to run with assertions enabled, so its checks now account for assertion-related code paths. This change affects development checks only; it does not alter application behavior or add user-facing features.
The .clang-tidy configuration and CMake clang-tidy invocation now pass CCCL_ENABLE_ASSERTIONS=1 as a preprocessor definition.
Changes: Clang-tidy assertions
Layer / File(s)
Summary
Add the assertions definition .clang-tidy, cmake/run_clang_tidy.sh.in
Both clang-tidy configurations pass CCCL_ENABLE_ASSERTIONS=1 as a preprocessor definition.
Suggested reviewers:bernhardmgruber
Change: Other
Merge Risk: Minimal · up to c6bf2
This change only affects static analysis configuration and does not alter runtime behavior of the library. It is low risk to merge, though CI clang-tidy results should be watched in case the newly enabled assertion code surfaces warnings.
Architecture risk: Low · up to c6bf2
The change affects 1 system.
Changed systems:cmake
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — cmake (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
observed — Modified behavior in cmake/run_clang_tidy.sh.in: The clang-tidy invocation adds the CCCL_ENABLE_ASSERTIONS=1 preprocessor definition.
observed — Modified behavior in .clang-tidy: Adds CCCL_ENABLE_ASSERTIONS=1 as a preprocessor definition in ExtraArgsBefore.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 038308b and c6bf265.
Files selected for processing: 2
.clang-tidy
cmake/run_clang_tidy.sh.in
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Even though we run
clang-tidyin the debug preset, some targets (like benchmarks) force-enable optimization flags or otherwise disable assertions. Sinceclang-tidyisn't running any code, we should make sure it sees all code regardless of optimization level. This should help reduce false positives around_CCCL_ASSERT()and friends.Checklist