[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Avoid in coroutines (PR #140912)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 4 02:17:27 PDT 2025
vbvictor wrote:
I have a mixed feeling about whether we should always exclude all coroutines by default or not.
When a coroutine has only one `co-operator` and nothing else should be safe to use a reference parameter? Am I wrong?
So I think to be "on a safe side" I'd suggest a new option "IngoreCoroutines" that will be `true` by default. If A user 100% knows that all references will outlive the coroutine he could set it to `false` and check performance issues:). In the option description, we could describe why it is not good to disable it.
Generally speaking, maybe It's not _very_ good to implement _recommendations_ of cppcore-guidlines as a must in non-cppcore checks.
I'd be happy to land your changes with this option, without - I'd want a second opinion from a maintainer.
https://github.com/llvm/llvm-project/pull/140912
More information about the cfe-commits
mailing list