[libcxx-commits] [PATCH] D89588: [libcxx] [test] Remove a duplicate definition of _CRT_SECURE_NO_WARNINGS
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 16 13:06:42 PDT 2020
mstorsjo created this revision.
mstorsjo added reviewers: libc++, STL_MSFT.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.
This is already defined by libcxx/utils/libcxx/test/config.py (for any windows target), while msvc_stdlib_force_include.h only is included when actually testing with the MSVC C++ library.
The command line define (-D_CRT_SECURE_NO_WARNINGS) defines it to the value 1, while a plain "#define _CRT_SECURE_NO_WARNINGS" in code defines it to an empty string, which can cause warnings (that are treated as errors).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89588
Files:
libcxx/test/support/msvc_stdlib_force_include.h
Index: libcxx/test/support/msvc_stdlib_force_include.h
===================================================================
--- libcxx/test/support/msvc_stdlib_force_include.h
+++ libcxx/test/support/msvc_stdlib_force_include.h
@@ -13,9 +13,6 @@
// MSVC standard library.
#ifndef _LIBCXX_IN_DEVCRT
- // Silence warnings about CRT machinery.
- #define _CRT_SECURE_NO_WARNINGS
-
// Avoid assertion dialogs.
#define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()
#endif // _LIBCXX_IN_DEVCRT
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89588.298731.patch
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201016/13ec72a8/attachment.bin>
More information about the libcxx-commits
mailing list