================
@@ -302,6 +303,20 @@ void UnnecessaryCopyInitialization::check(
   }
 }
 
+void UnnecessaryCopyInitialization::makeDiagnostic(
+    DiagnosticBuilder Diagnostic, const VarDecl &Var, const Stmt &BlockStmt,
----------------
legrosbuffle wrote:

I can't really do that because each of the two uses of this function are 
streaming one description-dependent parameter (`IsConstQualified` for one and 
`OldVar` for the other). These are even different types. So it feels simpler to 
stream before entering the function, so that the function only holds logic 
which is common to both callers.

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

Reply via email to