[PATCH] D102175: [clang-tidy] performance-unnecessary-copy-initialization: Remove the complete statement when the copied variable is unused.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 14 09:40:14 PDT 2021


ymandel added a comment.

Hi Felix,
Can you clarify your concern over the warning? Is it the case that the warning is not present before the fix and is only triggered after the fix?  I'm concerned that removing the call may have unintended side effects and I would think it might better to leave the check for usage separate.  However, if the fix is causing the warning then I can understand better why you want to make this change.  That said, have considered replacing the var binding with `(void)`, rather than deleting the statement?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102175/new/

https://reviews.llvm.org/D102175



More information about the cfe-commits mailing list