Implement NOTREACHED_NORETURN()

This imitation of Chromium's NOTREACHED_NORETURN() simply calls
CHECK(false), similar to how the existing NOTREACHED() simply calls
DCHECK(false).

Bug: pdfium:2008
Change-Id: I658bf1daa80db5c3c58a5450975db694f12692ee
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/third_party/base/notreached.h b/third_party/base/notreached.h
index 0e0417b..124abd3 100644
--- a/third_party/base/notreached.h
+++ b/third_party/base/notreached.h
@@ -9,6 +9,16 @@
 
 #include "third_party/base/check.h"
 
+// TODO(crbug.com/pdfium/2008): Migrate NOTREACHED() callers to
+// NOTREACHED_NORETURN() which is [[noreturn]] and always FATAL. Once that's
+// done, rename NOTREACHED_NORETURN() back to NOTREACHED() and remove the
+// non-FATAL version.
 #define NOTREACHED() DCHECK(false)
 
+// NOTREACHED_NORETURN() annotates paths that are supposed to be unreachable.
+// They crash if they are ever hit.
+// TODO(crbug.com/pdfium/2008): Rename back to NOTREACHED() once there are no
+// callers of the old non-CHECK-fatal macro.
+#define NOTREACHED_NORETURN() CHECK(false)
+
 #endif  // THIRD_PARTY_BASE_NOTREACHED_H_