diff options
author | Neil <nyamatongwe@gmail.com> | 2014-03-16 09:27:43 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-03-16 09:27:43 +1100 |
commit | 50fda0af2af33525bbc618762f24cdfd69039410 (patch) | |
tree | 55fe62d09511c5924365903352f717f549c6308a | |
parent | 372bb63409f10b6939fb29ca06039bf3272d1220 (diff) | |
download | scintilla-mirror-50fda0af2af33525bbc618762f24cdfd69039410.tar.gz |
Avoid warnings from Clang analyzer.
-rw-r--r-- | include/Platform.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/Platform.h b/include/Platform.h index 3920f7321..d83e7f26c 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -444,6 +444,16 @@ public: static DynamicLibrary *Load(const char *modulePath); }; +#if defined(__clang__) +# if __has_feature(attribute_analyzer_noreturn) +# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +# else +# define CLANG_ANALYZER_NORETURN +# endif +#else +# define CLANG_ANALYZER_NORETURN +#endif + /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. @@ -488,7 +498,7 @@ public: } static void DebugPrintf(const char *format, ...); static bool ShowAssertionPopUps(bool assertionPopUps_); - static void Assert(const char *c, const char *file, int line); + static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN; static int Clamp(int val, int minVal, int maxVal); }; |