[libcxx-commits] [PATCH] D155554: [libcxx] [test] Fix running tests with Clang-cl in Debug mode
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 18 12:53:15 PDT 2023
mstorsjo added inline comments.
================
Comment at: libcxx/test/support/set_windows_crt_report_mode.h:13
+#if defined(__cplusplus) && __cplusplus > 199711L
#ifndef _DEBUG
----------------
Mordante wrote:
> 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`
Ok, I'll amend this with a comment.
================
Comment at: libcxx/test/support/set_windows_crt_report_mode.h:36
static int init_crt_anchor = init_crt_report_mode();
+#endif
----------------
Mordante wrote:
>
Thanks, will fix.
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