Commit e1ce3a3d authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Define __ADDRESS_SANITIZER__ if compiling under clang's AddressSanitizer

parent 16d486ec
...@@ -206,6 +206,11 @@ ...@@ -206,6 +206,11 @@
#define __has_feature(x) 0 #define __has_feature(x) 0
#endif #endif
/* GCC defines __ADDRESS_SANITIZER__, so reuse the macro for clang */
#if __has_feature(address_sanitizer)
#define __ADDRESS_SANITIZER__
#endif
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR >= 6) #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR >= 6)
#define STATIC_ASSERT(cond, msg) _Static_assert(cond, msg) #define STATIC_ASSERT(cond, msg) _Static_assert(cond, msg)
#elif __has_feature(c_static_assert) #elif __has_feature(c_static_assert)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment