Commit Graph

27 Commits

Author SHA1 Message Date
Kostya Serebryany
497f912ab2 [asan] Make vector asan annotations exception-friendly
Fix vector asan annotations with RAII.
Add a test.
Also, remove one dead function.
Review: http://reviews.llvm.org/D4170



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216995 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:43:38 +00:00
Eric Fiselier
682132b4cc fix missing include for ::close in platform_support.h
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215998 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 17:52:40 +00:00
Jonathan Roelofs
6f10d47bbc Give libcxx tests temporary filenames that are actually unique.
This fixes a race condition on temp file name creation.

http://reviews.llvm.org/D4962


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 13:56:56 +00:00
Eric Fiselier
31b9c44aa7 Add bare_allocator archetype that implements the minimal possible allocator interface.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215691 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 04:15:41 +00:00
Marshall Clow
f0f1bca861 Fix PR#202520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214736 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 17:32:25 +00:00
Eric Fiselier
08b8506930 test commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213887 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-24 18:41:56 +00:00
Marshall Clow
bbeca21f26 Add a reset method to the counting predicates in the test suite
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212651 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-09 21:04:22 +00:00
Marshall Clow
675dd5cc4f Mark assign to be constepr only in c++14; can't have constexpr fns that return void in C++11
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210562 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-10 18:52:57 +00:00
Marshall Clow
281918b6aa Testing infastructure: A template for char_traits where all the functions are constexpr, and a comparison predicate which counts how many times it's been called.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210381 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-06 22:33:40 +00:00
Marshall Clow
1f50f2d64b Add Address Sanitizer support to std::vector
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@208319 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-08 14:14:06 +00:00
Marshall Clow
a178c13419 Bug #19473. If you pass an allocator to std::function, we should use that allocator, not construct one from scratch. Add a test to make sure
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@206623 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-18 17:23:36 +00:00
Marshall Clow
53c0e72d5c Implement LWG 2324: Insert iterator constructors should use addressof(). Add two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202741 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:20:40 +00:00
Marshall Clow
98760c18f8 Add license headers to a bunch of libc++ files that were missing them. No functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@199400 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 16:58:45 +00:00
Marshall Clow
1b92188a82 Found six (nmostly) identical files named 'test_allocator.h' in the libcxx test suite. Moved one to /support, made it a superset, and removed all but one of the others, and iupdated all the includes. Left the odd one (thread/futures/test_allocator.h) for later.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03 00:18:10 +00:00
Marshall Clow
ebedffde9a Found two identical files named 'allocators.h' in the libcxx test suite. Moved one to /support, removed the other, and iupdated all the includes. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 18:08:31 +00:00
Marshall Clow
e27dbcf2dc Found two identical files named 'DefaultOnly.h' in the libcxx test suite. Moved one to /support, removed the other, and iupdated all the includes. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@196118 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 17:00:56 +00:00
Marshall Clow
061d0cc4db There were two identical files named 'min_allocator.h'. Move one of them to /support and delete the other. Then adjust all the tests that used them to include the moved one. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26 20:58:02 +00:00
Howard Hinnant
ae2b90b86d G M: 1. It changes the temp file handling to use the template and the current directory for windows, matching how it works on other platforms.
2. It re-enables the temp file handling for mingw that regressed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192073 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 21:14:05 +00:00
Marshall Clow
4a0a98166c First half of support for N3657; heterogenous lookups for set/multiset
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188241 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 01:11:06 +00:00
Howard Hinnant
e9df0a5c6c Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.

This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:

- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
  _MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
   when _WIN32 is defined.

This leaves _WIN32 for code using the Windows API.

This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.

Nico, please prepare a patch for CREDITS.TXT, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Howard Hinnant
171771a9f5 War on tabs.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 21:06:38 +00:00
Howard Hinnant
a5f0e6c5c1 İsmail Dönmez: Change to mktemp template to make it compatible with Linux.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180267 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-25 16:08:55 +00:00
Howard Hinnant
06d8bf6ce2 Test cleanup with respect to use of deprecated tmpnam function. Also Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177755 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 20:05:40 +00:00
Marshall Clow
a22d2addb1 Removed raw references to _WIN32; now just check to see if it is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
b4ebb0e415 Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172436 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:12:54 +00:00
Marshall Clow
304c31b355 Made test output iterators have value_type of 'void'; matches ones in library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 17:20:02 +00:00
Marshall Clow
83e2c4d877 Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171594 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-05 03:21:01 +00:00