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

2024-07-26 Thread Kevin Wolf via cfe-commits
kevmw wrote: I'm the person who asked @tbaederr last year if this could be added for the benefit of QEMU, and as I'm looking at it again now, I thought maybe I should leave a comment here. In QEMU, we currently handle the problem with a coding convention (public functions get TSA attributes _

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

2024-08-30 Thread Kevin Wolf via cfe-commits
kevmw wrote: > But as a rule of thumb, static analysis attributes always belong on the > publicly visible declaration. Otherwise, the caller can't see them. Yes, the theory is obvious and easy to understand, at least once you think of it. Applying it in practice is where I made the experience

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

2024-10-02 Thread Kevin Wolf via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: kevmw wrote: > This example from the failing test should warn I think > [...] > Since the definition of foo2 specifies attributes that aren't pres