aoates wrote:

I'm very excited about this, as I have wanted it for many years for my C 
codebase, and TSA is not super useful in C without this!

One thought --- you could consider an attribute that could be put on pointer 
arguments to functions that says "yes, I dereference this and read or write 
it".  In a codebase that otherwise would have many false positives, you could 
annotate at least core data structures without having to turn it on for all 
address-of operations.

E.g
```void hashtable_insert(htbl_t* WRITES_POINTER table, ...)```

In the C codebase I desperately want this for, an annotation like that 
sprinkled in a couple key places would get you 80% of the benefit with much 
lower risk of false positives.

https://github.com/llvm/llvm-project/pull/123063
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to