diagnostics: Reduce cloning of `DiagnosticEntry` (#39193)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
0811d48a7aLukas Wirth committed on 9/30/2025, 11:41:49 AM· committed by GitHubparentd8cafdf
14 files changedLine totals unavailable