[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

Justin Stitt via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 17:12:19 PDT 2024


JustinStitt wrote:

@kees @vitalybuka 3ef8d3c implements `-fsanitize=pattern-exclusion=`.

It supports the following values:
`all` - turn all supported pattern exclusions ON
`none` - turn them all off (has precedence over others, I will add a warning soon if users try to use this with "all" or any of the other ones
`add-overflow-test` - excludes the pattern `if (a + b < a)` from sanitizers
`negated-unsigned-const` - excludes the pattern `-5UL` (this needs renaming because it doesn't only work on const)
`post-decr-while` - excludes the pattern `while (i--)` where `i` is unsigned.

I made an effort to rename everything in the source too, not just the user-facing stuff. The tests are updated too.

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


More information about the cfe-commits mailing list