[clang] [clang] Don't warn if the capturing object is also temporary. (PR #117733)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 28 00:10:11 PST 2024
hokein wrote:
> It is possible that the temporary capturing object uses the captured entity in its destructor.
This is a good point. We could potentially limit the suppression to cases where the destructor is trivial, but that might not be worth the added complexity.
Agree that this is probably not a critical issue -- I just noticed it while reading the code. I’m fine with leaving it as is. I have repurposed this PR to add a test case for it instead.
https://github.com/llvm/llvm-project/pull/117733
More information about the cfe-commits
mailing list