[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-28 Thread Cory Fields via cfe-commits
theuni wrote: Turning this on points out a pretty surprising missed nrvo opportunity: #38674. The warning is helpful for pointing out missed opportunities in user code, but it's not of much use if it's pointing out missed opportunities for clang too :) https://github.com/llvm/llvm-project/pull

[clang] [clang][ThreadSafety]: fix discrepancy between capability attributes (PR #139343)

2025-05-28 Thread Cory Fields via cfe-commits
theuni wrote: Ping. I'm unsure of the fix here, but it'd be nice to have a confirmation of the bug it attempts to fix. https://github.com/llvm/llvm-project/pull/139343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][ThreadSafety]: fix descrepency between capability attributes (PR #139343)

2025-05-09 Thread Cory Fields via cfe-commits
https://github.com/theuni created https://github.com/llvm/llvm-project/pull/139343 Fix the case where `release_generic_capability` did not correctly release when used as a reverse capability as enabled by commit 6a68efc959. I noticed this when trying to implement a reverse lock. My my project

[clang] [clang][ThreadSafety]: fix discrepancy between capability attributes (PR #139343)

2025-05-09 Thread Cory Fields via cfe-commits
https://github.com/theuni edited https://github.com/llvm/llvm-project/pull/139343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-06-20 Thread Cory Fields via cfe-commits
theuni wrote: I tried out this WIP on our codebase after we ran into a problem where an annotation was added to a definition rather than a declaration, leading to a (silently) missed capability check. This addition seems to work fine, but it triggers warnings when annotations are added to bot