[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

Justin Stitt via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 14:53:33 PDT 2024


JustinStitt wrote:

> 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.

I have the implementation done for this and I should get the PR up soon. 

Then we'll have something like this:

```
typedef int __attribute__((wraps)) wrapping_int
```

I'll be sure to CC you 😄

https://github.com/llvm/llvm-project/pull/107332


More information about the cfe-commits mailing list