Bug 1316545 part 7 - Suppress the warning of invalid noreturn for static analysis. r?froydnj
MozReview-Commit-ID: CXt1DezWsgL
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -210,17 +210,24 @@ MOZ_ReportCrash(const char* aStr, const
* compiler doesn't hassle us to provide a return statement after a
* MOZ_REALLY_CRASH() call.
*
* (Technically these are Windows requirements, not MSVC requirements. But
* practically you need MSVC for debugging, and we only ship builds created
* by MSVC, so doing it this way reduces complexity.)
*/
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winvalid-noreturn"
+#endif
__declspec(noreturn) __inline void MOZ_NoReturn() {}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
# ifdef __cplusplus
# define MOZ_REALLY_CRASH() \
do { \
::__debugbreak(); \
*((volatile int*) NULL) = __LINE__; \
::TerminateProcess(::GetCurrentProcess(), 3); \
::MOZ_NoReturn(); \