aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-05 19:37:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-05 19:37:54 +0000
commit7c24d4db412189cf83de2bb328543564c8ad9224 (patch)
treee4cb51a132da750e46b4dd83d720afb516c340e2
parent15de40171694cbc46a4d1aeb4cd13e9a748fdede (diff)
downloadsrc-7c24d4db412189cf83de2bb328543564c8ad9224.tar.gz
src-7c24d4db412189cf83de2bb328543564c8ad9224.zip
Vendor import of libc++ release_40 branch r294123:vendor/libc++/libc++-release_40-r294123
Notes
Notes: svn path=/vendor/libc++/dist/; revision=313295 svn path=/vendor/libc++/libc++-release_40-r294123/; revision=313296; tag=vendor/libc++/libc++-release_40-r294123
-rw-r--r--include/__tree2
-rw-r--r--test/libcxx/containers/associative/undef_min_max.pass.cpp22
2 files changed, 24 insertions, 0 deletions
diff --git a/include/__tree b/include/__tree
index dd32f7005866..2fbb479801c2 100644
--- a/include/__tree
+++ b/include/__tree
@@ -17,6 +17,8 @@
#include <stdexcept>
#include <algorithm>
+#include <__undef_min_max>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
diff --git a/test/libcxx/containers/associative/undef_min_max.pass.cpp b/test/libcxx/containers/associative/undef_min_max.pass.cpp
new file mode 100644
index 000000000000..b108f0ce5736
--- /dev/null
+++ b/test/libcxx/containers/associative/undef_min_max.pass.cpp
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-W#warnings"
+#endif
+
+#define min THIS IS A NASTY MACRO!
+#define max THIS IS A NASTY MACRO!
+
+#include <map>
+
+int main() {
+ std::map<int, int> m;
+ ((void)m);
+}