================ @@ -302,6 +303,20 @@ void UnnecessaryCopyInitialization::check( } } +void UnnecessaryCopyInitialization::makeDiagnostic( + DiagnosticBuilder Diagnostic, const VarDecl &Var, const Stmt &BlockStmt, ---------------- PiotrZSL wrote:
Create Diagnostic fully in this method instead of injecting it, and change method name in emitDiagnostic. And as this is called with 2 different strings, you can create 2 methods, or make if inside this method to select proper diagnostic text. https://github.com/llvm/llvm-project/pull/73921 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits