================ @@ -312,6 +312,38 @@ This attribute may not be supported by other compilers, so consider using it together with ``#if defined(__clang__)``. +Disabling instrumentation of common overflow idioms +===================================================== + +There are certain overflow-dependent code patterns which produce a lot of noise +for integer overflow/truncation sanitizers. To disable instrumentation for +these common patterns one should use ``-fno-sanitize-overflow-idioms``. Its +inverse ``-fsanitize-overflow-idioms`` also exists but has no function other +than to disable an already present ``-fno-sanitize-overflow-idioms``. + +Currently, this option handles three pervasive overflow-dependent code idioms: + +.. code-block:: c++ + + unsigned long foo = -1UL; // No longer causes a negation overflow warning ---------------- JustinStitt wrote:
https://godbolt.org/z/r3a31fKvx I am getting runtime errors. https://github.com/llvm/llvm-project/pull/100272 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits