From 2250a21f8535fb8f79b19047ce118766bd8d6868 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Thu, 5 Sep 2013 20:23:35 -0700 Subject: [PATCH] Added clang analyzer annotation. --- src/bgfx_p.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 11ba2fd56..b2e98d130 100755 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -16,9 +16,20 @@ #include #include +// clang analyzer annotation +#if !defined(__has_feature) +# define __has_feature(_a) 0 +#endif // !defined(__has_feature) + +#if __has_feature(attribute_analyzer_noreturn) +# define CLANG_ANALYZER_NO_RETURN __attribute__( (analyzer_noreturn) ) +#else +# define CLANG_ANALYZER_NO_RETURN +#endif // __has_feature(attribute_analyzer_noreturn) + namespace bgfx { - void fatal(Fatal::Enum _code, const char* _format, ...); + void fatal(Fatal::Enum _code, const char* _format, ...) CLANG_ANALYZER_NO_RETURN; void dbgPrintf(const char* _format, ...); }