aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-03-16 09:27:43 +1100
committerNeil <nyamatongwe@gmail.com>2014-03-16 09:27:43 +1100
commit8c2b4e16851610955f43f495f871e9513e45761f (patch)
tree9cad2752709593f1b0bc72c4a376ad0cc8e52048
parent01ddfa39df7f6c5ac3adfb389d8a92d79a715552 (diff)
downloadscintilla-mirror-8c2b4e16851610955f43f495f871e9513e45761f.tar.gz
Avoid warnings from Clang analyzer.
-rw-r--r--include/Platform.h12
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);
};