]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Add ATTR_UNSIGNED_WRAPS for disabling clang -fsanitize=integer
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 18 Nov 2016 23:39:42 +0000 (01:39 +0200)
committerGitLab <gitlab@git.dovecot.net>
Thu, 24 Nov 2016 21:27:16 +0000 (23:27 +0200)
src/lib/macros.h

index 4eff76eb08eec506905e4242442d85eba5fd7e69..adfaea9118cad6b7df0136185b01b8c61c779e73 100644 (file)
 #  define likely(expr) expr
 #endif
 
+#if defined(__clang__)
+#  define ATTR_UNSIGNED_WRAPS __attribute__((no_sanitize("integer")))
+#else
+#  define ATTR_UNSIGNED_WRAPS
+#endif
+
 /* Provide macros for error handling. */
 #ifdef DISABLE_ASSERTS
 #  define i_assert(expr)