1 // Copyright 2020 The Chromium Authors. All rights reserved. 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 THIRD_PARTY_BASE_NOTREACHED_H_ 6 #define THIRD_PARTY_BASE_NOTREACHED_H_ 7 8 #include <assert.h> 9 10 #include "third_party/base/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 // THIRD_PARTY_BASE_NOTREACHED_H_ 25