Commit a6c5953a authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

clang: add an exception for BUG_ON_HANDLER

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f54f9f0e
......@@ -13,6 +13,7 @@
# define __raise() raise(SIGABRT)
#endif
#ifndef __clang_analyzer__
# define BUG_ON_HANDLER(condition) \
do { \
if ((condition)) { \
......@@ -21,6 +22,12 @@
*(volatile unsigned long *)NULL = 0xdead0000 + __LINE__; \
} \
} while (0)
#else
# define BUG_ON_HANDLER(condition) \
do { \
assert(!condition); \
} while (0)
#endif
#endif /* BUG_ON_HANDLER */
......
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