[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 3 01:05:10 PDT 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/67095 at github.com>
tbaederr wrote:
It's pretty easy to get an error like:
```
./tsa.c:77:18: error: incompatible function pointer types assigning to 'int (*)(int) __attribute__((requires_capability(blah)))' from 'int (void)' [-Wincompatible-function-pointer-types]
77 | function_ptr = foo2;
| ^ ~~~~
```
but as soon as I change `foo2` to also take an int parameter, the error vanishes completely.
https://github.com/llvm/llvm-project/pull/67095
More information about the cfe-commits
mailing list