chore: Enable clang-tidy check for CRTP constructor accessibility - #6452
Merged
bthomee merged 12 commits intoMar 16, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6452 +/- ##
=======================================
Coverage 79.8% 79.8%
=======================================
Files 878 878
Lines 67887 67895 +8
Branches 7554 7551 -3
=======================================
+ Hits 54196 54212 +16
+ Misses 13691 13683 -8
🚀 New features to boost your workflow:
|
godexsoft
marked this pull request as ready for review
March 3, 2026 11:59
Contributor
There was a problem hiding this comment.
Pull request overview
Enables the bugprone-crtp-constructor-accessibility clang-tidy check and updates several CRTP-style classes to satisfy the new rule by tightening base-constructor accessibility.
Changes:
- Enable
bugprone-crtp-constructor-accessibilityin.clang-tidy. - Make CRTP base constructors non-public and add
friend TDerived/friend Derivedwhere needed. - Replace inherited constructors (
using Base::Base) with explicit derived constructors in affected step types.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/xrpld/app/paths/detail/XRPEndpointStep.cpp |
Makes CRTP base ctor non-public and adds friendship; adds explicit ctor for XRPEndpointPaymentStep. |
src/xrpld/app/paths/detail/DirectStep.cpp |
Makes CRTP base ctor private + friends derived; replaces inherited ctors with explicit ctors in derived classes. |
src/xrpld/app/paths/detail/BookStep.cpp |
Makes CRTP base ctor private + friends derived; adds explicit ctor for BookPaymentStep. |
src/test/app/XChain_test.cpp |
Updates CRTP-like test helper to have a non-public base ctor and friends the derived type. |
src/libxrpl/basics/ResolverAsio.cpp |
Makes AsyncObject ctor non-public and friends Derived for CRTP compliance. |
.clang-tidy |
Enables the new bugprone check and reorders a few existing checks in the list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a1q123456
reviewed
Mar 11, 2026
bthomee
approved these changes
Mar 16, 2026
bthomee
enabled auto-merge (squash)
March 16, 2026 19:53
beartec-jpg
pushed a commit
to beartec-jpg/FalconLedger
that referenced
this pull request
Jun 1, 2026
…PLF#6452) This change enables the `bugprone-crtp-constructor-accessibility` check and fixes the few compilation issues resulting from enabling it.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
High Level Overview of Change
This PR enables
bugprone-crtp-constructor-accessibilityand fixes the few compilation issues we got from enabling it.Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)