From 5915ea929c43d61e77b68b64bc91d8709f5c9876 Mon Sep 17 00:00:00 2001 From: Christopher Grant Date: Mon, 4 Nov 2019 21:34:20 -0500 Subject: Add fallthrough annotations on new C++ switches A recent commit converted some source from C to C++. Chrome has checks against unannotated switch case fallthroughs in C++ code, so the converted source needs annotations. Bug: 990190 Change-Id: Ib92435b4877be936f837928a70b552ec4975d42a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1898429 Reviewed-by: Mark Mentovai Reviewed-by: Mike Frysinger --- src/processor/minidump.cc | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/processor') diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index 78faf77a..75b6b455 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -54,6 +54,7 @@ #include "processor/range_map-inl.h" +#include "common/macros.h" #include "common/scoped_ptr.h" #include "common/stdio_wrapper.h" #include "google_breakpad/processor/dump_context.h" @@ -62,22 +63,6 @@ #include "processor/convert_old_arm64_context.h" #include "processor/logging.h" -// All intentional fallthroughs in breakpad are in this file, so define -// this macro locally. -// If you ever move this to a .h file, make sure it's defined in a -// private header file: clang suggests the first macro expanding to -// [[clang::fallthrough]] in its diagnostics, so if BP_FALLTHROUGH -// is visible in code depending on breakpad, clang would suggest -// BP_FALLTHROUGH for code depending on breakpad, instead of the -// client code's own fallthrough macro. -// TODO(thakis): Once everyone uses C++17, use its [[fallthrough]] instead. -#if defined(__clang__) -#define BP_FALLTHROUGH [[clang::fallthrough]] -#else -#define BP_FALLTHROUGH -#endif - - namespace google_breakpad { using std::istream; -- cgit v1.2.1