melver wrote:

> We could make custom types that are filtered out in an ignorelist, allowing 
> for types to be more expressive -- without the need for annotations

Having this sort of semantic information detached from the code may cause some 
maintenance headaches. For example, if the type is renamed, developers have to 
remember to adjust the filter list as well.

I wished that we could just attach attributes to type, e.g. `typedef int 
__attribute__((no_sanitize("signed-integer-overflow")) wrapping_int` or 
something. One thing here is that this should _not_ be a type modifier (like 
volatile and such), so it does not change the type, but that means nothing 
enforces it's propagated through conversions. But I suppose that the filter 
list has the same problem as you depend on specific type names.

Just something to consider - I suspect it's much more complex to implement in 
Clang though. So that's a +1 for the filterlist in terms of complexity.

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

Reply via email to