[llvm] [Diagnostics] Return rvalue reference from temporary argument (PR #127400)
Jonas Hahnfeld via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 11 12:38:51 PDT 2025
================
@@ -69,6 +69,11 @@ class OptimizationRemarkEmitter {
/// Output the remark via the diagnostic handler and to the
/// optimization record file.
void emit(DiagnosticInfoOptimizationBase &OptDiag);
+ /// Also allow r-value for OptDiag to allow emitting a temporarily-constructed
+ /// diagnostic.
+ void emit(DiagnosticInfoOptimizationBase &&OptDiag) {
+ emit(static_cast<DiagnosticInfoOptimizationBase &>(OptDiag));
----------------
hahnjo wrote:
No, it's not once we have an r-value. Removed.
https://github.com/llvm/llvm-project/pull/127400
More information about the llvm-commits
mailing list