[libcxx-commits] [PATCH] D155823: [libcxx] [test] Make set_windows_crt_report_mode.h more explicit

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 28 13:52:01 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcd1b8be8de91: [libcxx] [test] Make set_windows_crt_report_mode.h more explicit (authored by andrewng, committed by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155823/new/

https://reviews.llvm.org/D155823

Files:
  libcxx/test/support/set_windows_crt_report_mode.h


Index: libcxx/test/support/set_windows_crt_report_mode.h
===================================================================
--- libcxx/test/support/set_windows_crt_report_mode.h
+++ libcxx/test/support/set_windows_crt_report_mode.h
@@ -33,9 +33,12 @@
 // that setting and instead changes the assertion handler to log to stderr
 // instead.
 inline int init_crt_report_mode() {
-  _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
-  _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
-  _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+  _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+  _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+  _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
   return 0;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155823.545267.patch
Type: text/x-patch
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230728/6103ea91/attachment.bin>


More information about the libcxx-commits mailing list