Browse Source

Added clang analyzer config.

Branimir Karadzic 11 years ago
parent
commit
07f052201a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/bgfx_p.h

+ 6 - 1
src/bgfx_p.h

@@ -10,7 +10,7 @@
 #	define BGFX_CONFIG_DEBUG 0
 #	define BGFX_CONFIG_DEBUG 0
 #endif // BGFX_CONFIG_DEBUG
 #endif // BGFX_CONFIG_DEBUG
 
 
-#if BGFX_CONFIG_DEBUG
+#if BGFX_CONFIG_DEBUG || BX_COMPILER_CLANG_ANALYZER
 #	define BX_TRACE _BX_TRACE
 #	define BX_TRACE _BX_TRACE
 #	define BX_WARN  _BX_WARN
 #	define BX_WARN  _BX_WARN
 #	define BX_CHECK _BX_CHECK
 #	define BX_CHECK _BX_CHECK
@@ -29,7 +29,12 @@
 
 
 namespace bgfx
 namespace bgfx
 {
 {
+#if BX_COMPILER_CLANG_ANALYZER
+	void __attribute__((analyzer_noreturn)) fatal(Fatal::Enum _code, const char* _format, ...);
+#else
 	void fatal(Fatal::Enum _code, const char* _format, ...);
 	void fatal(Fatal::Enum _code, const char* _format, ...);
+#endif // BX_COMPILER_CLANG_ANALYZER
+
 	void dbgPrintf(const char* _format, ...);
 	void dbgPrintf(const char* _format, ...);
 }
 }