[libcxx-commits] [PATCH] D155554: [libcxx] [test] Fix running tests with Clang-cl in Debug mode
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 18 12:10:12 PDT 2023
Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.
LGTM modulo some nits.
================
Comment at: libcxx/test/support/set_windows_crt_report_mode.h:13
+#if defined(__cplusplus) && __cplusplus > 199711L
#ifndef _DEBUG
----------------
mstorsjo wrote:
> Mordante wrote:
> > Why do we need to test for C+98? If needed can you use our normal `TEST_STD_VER` macro?
> One testcase in `libcxx/selftest/dsl/dsl.sh.py` tests compiling in C++03 mode. And for some reason, some of the MSVC headers that get included from `<crtdbg.h>` break if compiled in C++03 mode.
>
> I can look into changing this to include `test_macros.h` and checking `TEST_STD_VER >= 11` instead. But since this header is force-included in every test compilation, we should ideally keep it as minimal as possible, so including `test_macros.h` might not be ideal (even if most tests themselves do include it). And I presume `test_macros.h` fail if included in C mode, so we possibly need to check against `defined(__cplusplus)` anyway?
Thanks for the explanation. Can you add this information as comment. I'm fine with not including `test_macros.h`
================
Comment at: libcxx/test/support/set_windows_crt_report_mode.h:36
static int init_crt_anchor = init_crt_report_mode();
+#endif
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155554/new/
https://reviews.llvm.org/D155554
More information about the libcxx-commits
mailing list