• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CORE_FXCRT_NOTREACHED_H_
6 #define CORE_FXCRT_NOTREACHED_H_
7 
8 #include <assert.h>
9 
10 #include "core/fxcrt/check.h"
11 
12 // TODO(crbug.com/pdfium/2008): Migrate NOTREACHED() callers to
13 // NOTREACHED_NORETURN() which is [[noreturn]] and always FATAL. Once that's
14 // done, rename NOTREACHED_NORETURN() back to NOTREACHED() and remove the
15 // non-FATAL version.
16 #define NOTREACHED() DCHECK(false)
17 
18 // NOTREACHED_NORETURN() annotates paths that are supposed to be unreachable.
19 // They crash if they are ever hit.
20 // TODO(crbug.com/pdfium/2008): Rename back to NOTREACHED() once there are no
21 // callers of the old non-CHECK-fatal macro.
22 #define NOTREACHED_NORETURN() CHECK(false)
23 
24 #endif  // CORE_FXCRT_NOTREACHED_H_
25