[clang] [clang] Add -Wused-but-marked-unused to -Wattributes (PR #179790)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 8 12:09:40 PST 2026
Sirraide wrote:
I do wonder how much old code there is that uses this attribute instead of `maybe_unused` though; did we ever document whether this was supposed to mean ‘unused’ or ‘maybe unused’? Because it’s a common pattern to e.g. mark a variable as `maybe_unused` if it’s only used in an `assert()`; if there’s a lot of code out there that uses `unused` for this then we might not want to enable this, but at the same time, at that point the warning overall would just be fairly useless in general...
https://github.com/llvm/llvm-project/pull/179790
More information about the cfe-commits
mailing list