Bug 1553037 - clang-based disable static-analysis in `MOZ_REALLY_CRASH`. r=froydnj
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 22 May 2019 12:50:43 +0000
changeset 474952 dafb8769ab4899016e24b7b30f0014918c3ec943
parent 474951 6f891c10e2da60e2d5d33e1baa9d9fc7d2444350
child 474953 6f8c86be338dcd647d1d7e667a1be9293a35d13f
push id36052
push userbtara@mozilla.com
push dateThu, 23 May 2019 04:37:46 +0000
treeherdermozilla-central@d12917561f27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1553037
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1553037 - clang-based disable static-analysis in `MOZ_REALLY_CRASH`. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D32132
mfbt/Assertions.h
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -237,26 +237,26 @@ MOZ_NoReturn(int aLine) {
  */
 #  ifdef MOZ_UBSAN
 #    define MOZ_CRASH_WRITE_ADDR 0x1
 #  else
 #    define MOZ_CRASH_WRITE_ADDR NULL
 #  endif
 
 #  ifdef __cplusplus
-#    define MOZ_REALLY_CRASH(line)                     \
-      do {                                             \
-        *((volatile int*)MOZ_CRASH_WRITE_ADDR) = line; \
-        ::abort();                                     \
+#    define MOZ_REALLY_CRASH(line)                                  \
+      do {                                                          \
+        *((volatile int*)MOZ_CRASH_WRITE_ADDR) = line; /* NOLINT */ \
+        ::abort();                                                  \
       } while (false)
 #  else
-#    define MOZ_REALLY_CRASH(line)                     \
-      do {                                             \
-        *((volatile int*)MOZ_CRASH_WRITE_ADDR) = line; \
-        abort();                                       \
+#    define MOZ_REALLY_CRASH(line)                                  \
+      do {                                                          \
+        *((volatile int*)MOZ_CRASH_WRITE_ADDR) = line; /* NOLINT */ \
+        abort();                                                    \
       } while (false)
 #  endif
 #endif
 
 /*
  * MOZ_CRASH([explanation-string]) crashes the program, plain and simple, in a
  * Breakpad-compatible way, in both debug and release builds.
  *