[clang] Sanitizer: Support -fwrapv with -fsanitize=signed-integer-overflow (PR #82432)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 15:18:23 PST 2024


================
@@ -70,6 +77,7 @@ void test1(void) {
   // WRAPV: add i8 {{.*}}, 1
----------------
MaskRay wrote:

L72 needs a `// CATCH_WRAP: getelementptr i32, ptr`

Actually, since -fsanitize=signed-integer-overflow and -fwrapv -fsanitize=signed-integer-overflow share so many checks. Perhaps share the check prefixes?

```
--check-prefixes=CATCH_UB,CATCH_UB_POINTER
--check-prefixes=CATCH_UB,NOCATCH_UB_POINTER
```

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


More information about the cfe-commits mailing list