]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 25 Nov 2016 13:28:33 +0000 (15:28 +0200)
src/lib/macros.h

index 36eb1584c22a15a8c92577168ac172ab8c4ccbbe..566c176d19e4fa59d300db436e2fae88b7caad26 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)