[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 23:31:43 PDT 2024
tbaederr 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 both the definition and declaration. This can be seen here: [bitcoin/bitcoin#30316](https://github.com/bitcoin/bitcoin/pull/30316)
>
> I went ahead and PR'd the removals because they're straightforward enough, but it seems (to me) that those these are all false positives. If the same annotation is listed in the declaration and definition, should it really warn?
No I don't think it should, at least that was not the intention of this patch. As it is right now, the code should warn for attributes listed in the definition, but _now_ in the declaration(s).
https://github.com/llvm/llvm-project/pull/67520
More information about the cfe-commits
mailing list