Sponsored Content
Skip to content

refactor: clean up uses of std::source_location - #6272

Merged
bthomee merged 2 commits into
XRPLF:developfrom
mvadari:src-loc-cleanup
Jan 23, 2026
Merged

refactor: clean up uses of std::source_location#6272
bthomee merged 2 commits into
XRPLF:developfrom
mvadari:src-loc-cleanup

Conversation

@mvadari

@mvadari mvadari commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR simplifies uses of std::source_location remove the macros checking if the clang version is < 15.

No source code changes.

Context of Change

The minimum Clang version supported is 16, so the checks for version < 15 are no longer necessary.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

N/A

Test Plan

CI still compiles and passes on all versions.

@mvadari mvadari added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Jan 23, 2026
Copilot AI review requested due to automatic review settings January 23, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes obsolete Clang version checks for std::source_location support. Since the minimum supported Clang version is now 16, the conditional includes for std::experimental::source_location (used for Clang < 15) are no longer necessary.

Changes:

  • Removed conditional preprocessor directives checking for Clang < 15
  • Replaced using source_location declarations with fully qualified std::source_location usage
  • Cleaned up includes by removing experimental source_location support

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/test/rpc/LedgerEntry_test.cpp Removed Clang < 15 version checks and updated all source_location references to std::source_location
src/test/jtx/TestHelpers.h Removed Clang < 15 version checks, updated source_location references to std::source_location, and reordered includes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jan 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.4%. Comparing base (0586b56) to head (3e9431f).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6272     +/-   ##
=========================================
- Coverage     79.4%   79.4%   -0.0%     
=========================================
  Files          839     839             
  Lines        71619   71619             
  Branches      8231    8235      +4     
=========================================
- Hits         56855   56850      -5     
- Misses       14764   14769      +5     

see 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvadari
mvadari requested a review from bthomee January 23, 2026 18:36
@bthomee
bthomee merged commit 778da95 into XRPLF:develop Jan 23, 2026
3 checks passed
@mvadari
mvadari deleted the src-loc-cleanup branch January 23, 2026 19:20
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Since the minimum Clang version we support is 16, the checks for version < 15 are no longer necessary. This change therefore removes the macros checking if the clang version is < 15 and simplifies uses of `std::source_location`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants