clang-tidy: resolve performance-inefficient-string-concatenation#585
clang-tidy: resolve performance-inefficient-string-concatenation#585greenc-FNAL wants to merge 9 commits into
clang-tidy: resolve performance-inefficient-string-concatenation#585Conversation
There was a problem hiding this comment.
Pull request overview
This PR resolves the performance-inefficient-string-concatenation clang-tidy warnings in two locations by restructuring string-building expressions to avoid creating temporary string objects from chained operator+ calls.
Changes:
- In
pymodule.cpp, inline the Python version components directly into the single concatenation expression forsite_packages. - In
framework_graph.cpp, use chainedstd::string::appendcalls instead ofoperator+when building the runtime_error message. - Mark the corresponding clang-tidy check as completed in the tracking document, linking to this PR.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/python/src/pymodule.cpp | Collapses version-string construction into the site_packages concatenation. |
| phlex/core/framework_graph.cpp | Rewrites error message construction using std::string::append chain. |
| docs/dev/clang-tidy-fixes-2026-04.md | Marks the check as resolved and links to PR #585. |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #585 +/- ##
==========================================
+ Coverage 82.62% 82.67% +0.04%
==========================================
Files 161 161
Lines 5895 5894 -1
Branches 682 682
==========================================
+ Hits 4871 4873 +2
+ Misses 803 801 -2
+ Partials 221 220 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@phlexbot format |
Format Fixes Applied✅ clang-format fixes pushed (commit 3a73e3d) |
|
@knoepfel Is there a reason C++23 |
I'd have to check whether |
Yeah, I think you need to change it to "ask" instead of "agent," maybe? test/form/reader.cpp and test/form/writer.cpp already use I've been using it if it works, bearing in mind that some things may not be there yet. |
Ah, I didn't realize this. In that case, |
3a73e3d to
5ab22b6
Compare
|
@copilot Please add/adjust tests to ensure that untested code paths touched by this PR are tested to ensure correct operation under expected circumstances. |
Added in commit |
|
@phlexbot format |
Format Fixes Applied✅ clang-format fixes pushed (commit 04cf7f3) |
04cf7f3 to
dcf84dd
Compare
There was a problem hiding this comment.
Looks like this merge got mangled (removing the record of fixes already performed).
…nt-string-concatenation
Agent-Logs-Url: https://github.com/Framework-R-D/phlex/sessions/9a745280-0b08-47d9-b865-d950ef99a4f1 Co-authored-by: knoepfel <7603566+knoepfel@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Framework-R-D/phlex/sessions/a1376bd9-3687-43e8-baaf-4fde93153dac Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
dcf84dd to
deba02b
Compare
No description provided.