Use std::ignore rather than ignore_result in Crashpad

Bug: 1285085
Change-Id: I02f1eb608a704fe58b72c094b96af6c7577be4bf
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3373171
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
diff --git a/DEPS b/DEPS
index 7bdeef7..73adbd4 100644
--- a/DEPS
+++ b/DEPS
@@ -39,7 +39,7 @@
       'e1e7b0ad8ee99a875b272c8e33e308472e897660',
   'crashpad/third_party/mini_chromium/mini_chromium':
       Var('chromium_git') + '/chromium/mini_chromium@' +
-      '0243b40af70e34c81fc8a30d9b15cd276b2d49ba',
+      'bbb68fcec19ff7c268fadeebd2ef79f7203fa2f2',
   'crashpad/third_party/libfuzzer/src':
       Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
       'fda403cf93ecb8792cb1d061564d89a6553ca020',
diff --git a/client/crash_report_database_generic.cc b/client/crash_report_database_generic.cc
index f5dfa89..754f578 100644
--- a/client/crash_report_database_generic.cc
+++ b/client/crash_report_database_generic.cc
@@ -18,9 +18,9 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#include <tuple>
 #include <utility>
 
-#include "base/ignore_result.h"
 #include "base/logging.h"
 #include "build/build_config.h"
 #include "client/settings.h"
@@ -356,14 +356,14 @@
     return kFileSystemError;
   }
   // We've moved the report to pending, so it no longer needs to be removed.
-  ignore_result(report->file_remover_.release());
+  std::ignore = report->file_remover_.release();
 
   // Close all the attachments and disarm their removers too.
   for (auto& writer : report->attachment_writers_) {
     writer->Close();
   }
   for (auto& remover : report->attachment_removers_) {
-    ignore_result(remover.release());
+    std::ignore = remover.release();
   }
 
   *uuid = report->ReportID();
diff --git a/client/crash_report_database_mac.mm b/client/crash_report_database_mac.mm
index d1c0a3e..52319be 100644
--- a/client/crash_report_database_mac.mm
+++ b/client/crash_report_database_mac.mm
@@ -25,8 +25,9 @@
 #include <unistd.h>
 #include <uuid/uuid.h>
 
+#include <tuple>
+
 #include "base/cxx17_backports.h"
-#include "base/ignore_result.h"
 #include "base/logging.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
 #include "base/posix/eintr_wrapper.h"
@@ -385,14 +386,14 @@
     PLOG(ERROR) << "rename " << path.value() << " to " << new_path.value();
     return kFileSystemError;
   }
-  ignore_result(report->file_remover_.release());
+  std::ignore = report->file_remover_.release();
 
   // Close all the attachments and disarm their removers too.
   for (auto& writer : report->attachment_writers_) {
     writer->Close();
   }
   for (auto& remover : report->attachment_removers_) {
-    ignore_result(remover.release());
+    std::ignore = remover.release();
   }
 
   Metrics::CrashReportPending(Metrics::PendingReportReason::kNewlyCreated);
diff --git a/client/crash_report_database_win.cc b/client/crash_report_database_win.cc
index 65feaa4..6331f65 100644
--- a/client/crash_report_database_win.cc
+++ b/client/crash_report_database_win.cc
@@ -21,9 +21,9 @@
 #include <time.h>
 #include <wchar.h>
 
+#include <tuple>
 #include <utility>
 
-#include "base/ignore_result.h"
 #include "base/logging.h"
 #include "base/numerics/safe_math.h"
 #include "base/strings/utf_string_conversions.h"
@@ -735,14 +735,14 @@
                                     time(nullptr),
                                     ReportState::kPending));
 
-  ignore_result(report->file_remover_.release());
+  std::ignore = report->file_remover_.release();
 
   // Close all the attachments and disarm their removers too.
   for (auto& writer : report->attachment_writers_) {
     writer->Close();
   }
   for (auto& remover : report->attachment_removers_) {
-    ignore_result(remover.release());
+    std::ignore = remover.release();
   }
 
   *uuid = report->ReportID();
diff --git a/client/crashpad_client_mac.cc b/client/crashpad_client_mac.cc
index b4a365d..d25bfb7 100644
--- a/client/crashpad_client_mac.cc
+++ b/client/crashpad_client_mac.cc
@@ -21,9 +21,9 @@
 #include <stdint.h>
 
 #include <memory>
+#include <tuple>
 #include <utility>
 
-#include "base/ignore_result.h"
 #include "base/logging.h"
 #include "base/mac/mach_logging.h"
 #include "base/strings/stringprintf.h"
@@ -178,7 +178,7 @@
         handler_restarter->StartRestartThread(
             handler, database, metrics_dir, url, annotations, arguments)) {
       // The thread owns the object now.
-      ignore_result(handler_restarter.release());
+      std::ignore = handler_restarter.release();
     }
 
     // If StartRestartThread() failed, proceed without the ability to restart.
@@ -362,7 +362,7 @@
       return false;
     }
 
-    ignore_result(receive_right.release());
+    std::ignore = receive_right.release();
     return true;
   }
 
diff --git a/test/mac/mach_multiprocess.cc b/test/mac/mach_multiprocess.cc
index 91a06e3..5f1b3ac 100644
--- a/test/mac/mach_multiprocess.cc
+++ b/test/mac/mach_multiprocess.cc
@@ -19,9 +19,9 @@
 
 #include <memory>
 #include <string>
+#include <tuple>
 
 #include "base/auto_reset.h"
-#include "base/ignore_result.h"
 #include "base/mac/scoped_mach_port.h"
 #include "gtest/gtest.h"
 #include "test/errors.h"
@@ -212,7 +212,7 @@
   ScopedForbidReturn forbid_return;
 
   // local_port is not valid in the forked child process.
-  ignore_result(info_->local_port.release());
+  std::ignore = info_->local_port.release();
 
   info_->local_port.reset(NewMachPort(MACH_PORT_RIGHT_RECEIVE));
   ASSERT_NE(info_->local_port, kMachPortNull);
diff --git a/util/mach/child_port_handshake.h b/util/mach/child_port_handshake.h
index c61f734..5416869 100644
--- a/util/mach/child_port_handshake.h
+++ b/util/mach/child_port_handshake.h
@@ -18,9 +18,9 @@
 #include <mach/mach.h>
 
 #include <string>
+#include <tuple>
 
 #include "base/files/scoped_file.h"
-#include "base/ignore_result.h"
 #include "util/mach/child_port_types.h"
 
 namespace crashpad {
@@ -124,7 +124,7 @@
 //!   // for use in the parent process.
 //!   if (child_port_handshake.RunClient(receive_right.get(),
 //!                                      MACH_MSG_TYPE_MOVE_RECEIVE)) {
-//!     ignore_result(receive_right.release());
+//!     std::ignore = receive_right.release();
 //!   }
 //! \endcode
 //!
diff --git a/util/mach/mach_message_test.cc b/util/mach/mach_message_test.cc
index 0bee04b..0c578b9 100644
--- a/util/mach/mach_message_test.cc
+++ b/util/mach/mach_message_test.cc
@@ -16,7 +16,8 @@
 
 #include <unistd.h>
 
-#include "base/ignore_result.h"
+#include <tuple>
+
 #include "base/mac/scoped_mach_port.h"
 #include "gtest/gtest.h"
 #include "test/mac/mach_errors.h"
@@ -154,7 +155,7 @@
   ASSERT_EQ(right_type,
             implicit_cast<mach_msg_type_name_t>(MACH_MSG_TYPE_PORT_SEND));
   EXPECT_TRUE(MachMessageDestroyReceivedPort(port, MACH_MSG_TYPE_PORT_RECEIVE));
-  ignore_result(receive.release());
+  std::ignore = receive.release();
   EXPECT_TRUE(MachMessageDestroyReceivedPort(port, MACH_MSG_TYPE_PORT_SEND));
 }
 
diff --git a/util/posix/close_stdio.cc b/util/posix/close_stdio.cc
index a8efc81..37c40a4 100644
--- a/util/posix/close_stdio.cc
+++ b/util/posix/close_stdio.cc
@@ -18,9 +18,10 @@
 #include <paths.h>
 #include <unistd.h>
 
+#include <tuple>
+
 #include "base/check.h"
 #include "base/files/scoped_file.h"
-#include "base/ignore_result.h"
 #include "base/posix/eintr_wrapper.h"
 
 namespace crashpad {
@@ -32,7 +33,7 @@
       HANDLE_EINTR(open(_PATH_DEVNULL, oflag | O_NOCTTY | O_CLOEXEC)));
   if (fd == desired_fd) {
     // Weird, but play along.
-    ignore_result(fd.release());
+    std::ignore = fd.release();
   } else {
     PCHECK(fd.get() >= 0) << "open";
     PCHECK(HANDLE_EINTR(dup2(fd.get(), desired_fd)) != -1) << "dup2";
diff --git a/util/stream/file_encoder.cc b/util/stream/file_encoder.cc
index 5cebbfc..d39b5b0 100644
--- a/util/stream/file_encoder.cc
+++ b/util/stream/file_encoder.cc
@@ -15,8 +15,8 @@
 #include "util/stream/file_encoder.h"
 
 #include <memory>
+#include <tuple>
 
-#include "base/ignore_result.h"
 #include "util/file/file_io.h"
 #include "util/file/file_reader.h"
 #include "util/file/scoped_remove_file.h"
@@ -77,7 +77,7 @@
   if (!output->Flush())
     return false;
 
-  ignore_result(file_remover.release());
+  std::ignore = file_remover.release();
   return true;
 }