[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 22 00:30:30 PDT 2023
================
@@ -136,6 +136,17 @@ int main(void) {
// Cleanup happens automatically -> no warning.
}
+ /// Function pointers
+ {
+ int __attribute__((requires_capability(&mu1))) (*function_ptr)(int) = Foo_fun1;
----------------
tbaederr wrote:
This assignment also works if `Foo_fun1` does not have the `requires_capability(&mu1)` attribute, it would be better if we warned here I guess.
https://github.com/llvm/llvm-project/pull/67095
More information about the cfe-commits
mailing list