Howard Hinnant
5544f7e0c7
Somehow aligned_union got dropped through the cracks. This adds it. Did a drive-by fix of alignment_of while I was in the neighborhood.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 19:37:49 +00:00
Howard Hinnant
b4e67cfd42
After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179760 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18 15:02:57 +00:00
Howard Hinnant
2062f37772
I believe this finishes up debug mode for list. The testing is a little weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179632 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 21:42:36 +00:00
Howard Hinnant
4313ec3975
addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 17:27:56 +00:00
Howard Hinnant
ae57a1ab1d
Numeric parsing was getting the wrong answer when faced with very long inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-15 20:40:06 +00:00
Howard Hinnant
993248935c
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-14 00:01:13 +00:00
Howard Hinnant
4f67100219
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13 18:19:25 +00:00
Howard Hinnant
6dcaf3ee1a
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 17:58:52 +00:00
Howard Hinnant
e1e96cb840
More list debug mode tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178873 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 15:04:10 +00:00
Howard Hinnant
79a35570a5
More work on debug mode for list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 00:18:49 +00:00
Howard Hinnant
128f7bf4fa
Somehow search_n never got tested, so of course it had a bug in it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15667 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04 15:40:48 +00:00
Howard Hinnant
4aa8b06e67
The move / swap members were not correctly taking all of the possible states of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:21:29 +00:00
Howard Hinnant
11a50ac497
Richard Smith: It was pointed out to me off-list that libc++'s non-compiler-builtin
...
implementation of std::is_polymorphic does this:
template <class _Tp> struct __is_polymorphic1 : public _Tp {};
... and that g++ rejects this if _Tp has an inaccessible virtual destructor
(because __is_polymorphic1<_Tp> would have a deleted virtual destructor
overriding _Tp's non-deleted destructor). Clang was failing to reject this;
I've fixed that in r178563, but that causes libc++'s corresponding test
case to fail with both clang and gcc when using the fallback
implementation. The fallback code also incorrectly rejects final types.
The attached patch fixes the fallback implementation of is_polymorphic; we
now use dynamic_cast's detection of polymorphic class types rather than
trying to determine if adding a virtual function makes the type larger:
enable_if<sizeof((_Tp*)dynamic_cast<const volatile
void*>(declval<_Tp*>())) != 0, ...>
Two things of note here:
* the (_Tp*) cast is necessary to work around bugs in Clang and g++ where
we otherwise don't instantiate the dynamic_cast (filed as PR15656)
* the 'const volatile' is here to treat is_polymorphic<cv T> as true for a
polymorphic class type T -- my reading of the standard suggests this is
incorrect, but it matches our builtin __is_polymorphic and gcc
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178576 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 21:25:06 +00:00
Howard Hinnant
d4c96a6c89
Some debug test cases for list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178565 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 19:53:32 +00:00
Howard Hinnant
9d00ed5d87
Test case was forming the wrong limits when size_t != unsigned long.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178370 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 21:22:22 +00:00
Howard Hinnant
8b25c00ef1
The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are disabled, so #ifdef'ing out the test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 17:20:04 +00:00
Daniel Dunbar
34d36f39b0
Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
...
bootstrap with libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 04:10:25 +00:00
Howard Hinnant
32d40f5f44
Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 21:40:54 +00:00
Howard Hinnant
02d5e18917
Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 19:04:56 +00:00
Howard Hinnant
d1c0082675
More vector debug tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178033 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 15:45:56 +00:00
Marshall Clow
c3a9b81e67
Fixed race conditions in thread tests; exposed by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178029 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 15:28:33 +00:00
Howard Hinnant
3fbd1dfb24
Simply debug mode tests per Dmitri Gribenko's suggestion.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 14:28:25 +00:00
Howard Hinnant
d9cdb2dcfd
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 13:48:57 +00:00
Howard Hinnant
782da33d1c
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 22:12:26 +00:00
Howard Hinnant
c1ca2e1e8b
Remove some erroneous code I was using to debug debug mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:46:07 +00:00
Howard Hinnant
295891fdc2
Debug mode tests for vector::front and back.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:31:25 +00:00
Howard Hinnant
0d01eb54e7
More vector::iterator debug mode tests. Run by adding to OPTIONS -D_LIBCPP_DEBUG2=1.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177897 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:03:19 +00:00
Howard Hinnant
f5f4684e71
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 19:29:35 +00:00
Howard Hinnant
ae7bf9daac
Marshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23 19:29:45 +00:00
Howard Hinnant
9976b5511a
This is a start at making the libc++ test suite friendlier to the -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23 17:27:16 +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
bdea27ba8f
Fix bug in test; found by AddressSanitizer
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20 00:01:48 +00:00
Marshall Clow
c19fe86743
Fix bug in test; found by AddressSanitizer
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 23:39:36 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +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
6319f1462d
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 19:06:24 +00:00
David Chisnall
76aa2ef017
Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.
...
This change removes the spurious m.unlock() call.
If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19 11:28:45 +00:00
Daniel Dunbar
3bc6a98c3e
[tests] Add support for a link_flags lit parameter.
...
- This is useful for testing with custom ABI libraries.
- Patch by Michael van der Westhuizen.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12 19:28:51 +00:00
Daniel Dunbar
6b875ef374
[tests] Another batch of timeout increases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11 21:04:34 +00:00
Daniel Dunbar
8eba41324c
[tests] Another batch of timeout increases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 18:26:55 +00:00
Daniel Dunbar
1608b64881
[tests] Add back stdc macros I accidentally refactored out.
...
- Patch by Michael van der Westhuizen:
--
r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic. This small patch re-adds the macros.
Making this change fixes the following tests on Linux:
- depr/depr.c.headers/inttypes_h.pass.cpp
- depr/depr.c.headers/stdint_h.pass.cpp
- input.output/file.streams/c.files/cinttypes.pass.cpp
- language.support/cstdint/cstdint.syn/cstdint.pass.cpp
--
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:41:28 +00:00
Daniel Dunbar
fe14b970ac
[tests] Increase a bunch of wait limits.
...
- Basically I just ran the thread tests many many times on a busy machine and
bumped the timeouts whenever I hit a test failure.
- This is obviously subpar, but is the best I can do without the tests being
rewritten to not depend on arbitrary timeouts.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174721 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 17:41:19 +00:00
Howard Hinnant
66a48c5ad5
Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:25:56 +00:00
Daniel Dunbar
7fa0ca75e5
[tests] Infer the cxx_under_test (as clang++).
...
- This is a reasonable default, and makes testing just work with no required
parameters.
- Add notes on all of the inferred or default values.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 20:24:23 +00:00
Daniel Dunbar
88dec1ef5c
[tests] Change test default to run against locally built library.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174528 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 17:47:08 +00:00
Daniel Dunbar
6b8b9922f0
[tests] Enable use_system_lib support on Linux.
...
- Patch by Michael van der Westhuizen.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174527 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 17:45:53 +00:00
Daniel Dunbar
cedb7fcc10
[tests] One last batch of XFAILs, for tests using new symbols added to libc++.
...
- As of this commit, the test suite should now fully pass on both darwin11 and
darwin12 when testing against either a locally built libc++ or the system libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 00:59:06 +00:00
Daniel Dunbar
5f4841fb83
[tests] Accept XFAIL arguments that match any part of a feature.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174469 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 00:04:52 +00:00
Daniel Dunbar
43807c2fba
[tests] XFAIL some locale tests that don't seem to work on any Darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174459 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:51:20 +00:00
Daniel Dunbar
4cceb7a5e8
[tests] If no explicit target triple is given, try to infer it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:28:03 +00:00
Daniel Dunbar
8b9eee35d8
[tests] Mark another stream input expected failure (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174453 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:21:52 +00:00
Daniel Dunbar
548d392d5d
[tests] Mark another stream input expected failure (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:10:28 +00:00
Daniel Dunbar
c8e1889601
[tests] Mark some string.conversions expected failures (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174451 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:10:27 +00:00
Daniel Dunbar
edfb05351e
[tests] XFAIL a few things that require libc (?) support missing on Darwin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174450 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 22:10:25 +00:00
Daniel Dunbar
aac8dd8331
[tests] Mark some istream.unformatted expected failures (with system libc++).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174444 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:43:32 +00:00
Daniel Dunbar
a5b51964c1
[tests] Add an available feature that combines the triple and use_system_lib.
...
- This is so that we can easily write XFAIL markers for tests that are known
to fail with versions of libc++ as were shipped with a particular triple.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:43:30 +00:00
Daniel Dunbar
81d1ef7a3f
[tests] Add support for REQUIRES and XFAIL lines in libc++ tests.
...
- We parse up to the first non-empty non-comment (C++ style) line, otherwise
the format and semantics match what is used for LLVM/Clang tests.
- For now, the only interesting thing to test against is a user supplied
target_triple test parameter.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174440 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 21:03:25 +00:00
Daniel Dunbar
cccf25579a
[tests] Add a 'use_system_lib' parameter.
...
- This controls whether to execute against the locally built library or
not. The default is currently True which maps to what was already being done
by default.
- I'd appreciate it if someone can implement the proper handling of this flag
on linux, I no longer remember the details of its .so handling.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05 18:03:49 +00:00
Howard Hinnant
5ce391e336
Make a few tests optimization-proof. These tests were failing under -O3 because the optimizer was eliminating the call to new.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172631 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:56:06 +00:00
Howard Hinnant
b05a55675f
Make <cmath> classification macros work with integral types.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:56:22 +00:00
Howard Hinnant
3e3ae9ec41
Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 18:59:43 +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
Howard Hinnant
750039f50c
Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:07:27 +00:00
Howard Hinnant
f619e230cc
Fix exception safety bug in vector::push_back
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:36:59 +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
Howard Hinnant
6ae47055f9
atomic_bool was missing (just a typedef to atomic<bool>).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:58:50 +00:00
Marshall Clow
8226d0b7c5
...and then there was one. Only one copy of 'iterators.h' in the test tree for libc++
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:24:04 +00:00
Marshall Clow
239e341c94
Removed another copy of 'iterators.h' files in libcxx/test
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 03:57:56 +00:00
Marshall Clow
ba1920fe4b
Removed several more different 'iterators.h' files in libcxx/test
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 02:29:29 +00:00
Marshall Clow
002a984948
Removed 7 (of 8) different 'iterators.h' files in test/localization
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03 01:45:09 +00:00
Howard Hinnant
352bd3a273
Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 20:09:48 +00:00
Howard Hinnant
3793a7d202
Test case for http://llvm.org/bugs/show_bug.cgi?id=14670 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170706 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 16:50:07 +00:00
Marshall Clow
a46482e8bb
Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170435 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 16:46:30 +00:00
Howard Hinnant
0a69fa14d2
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12 21:14:28 +00:00
Howard Hinnant
7fa77a701f
Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@169686 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-09 00:12:14 +00:00
Daniel Dunbar
af01e708aa
tests/lit: Change test default parameters to assume local build.
...
- Also, support overriding them with lit parameters.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168749 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 23:56:28 +00:00
Howard Hinnant
2d3f4ee99f
Add overflow check to tanh(complex) and reduce to finite answer. Fixes http://llvm.org/bugs/show_bug.cgi?id=13874
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164266 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19 23:51:47 +00:00
Howard Hinnant
6886dd19c4
Loosen up the timing requirements on 4 more tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161289 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-04 00:47:42 +00:00
Howard Hinnant
069bdd52c1
Andrew Morrow: There are two tests under test/utilities/memory that heap allocate two
...
integers which remain unused and are subsequently leaked, so the test
fail when run under valgrind. Unless I'm overlooking a subtle reason
why they are needed I think they can be removed, allowing these tests
to pass under valgrind. The attached patch removes the variables. If
there is a reason for them to exist, I can change this to just delete
them at the end of the test.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161195 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 18:39:48 +00:00
Howard Hinnant
63b2f4f2dc
Andrew Morrow: The attached patch updates the lit.config for libc++ unit tests so
...
that the valgrind configuration passed to lit.py is used to run .pass
tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161193 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 18:36:47 +00:00
Howard Hinnant
6d39f9f356
Andrew Morrow: This patch fixes
...
test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp
to accept '(nil)' as a valid representation for NULL so that the test
passes on Linux. The same thing is already done in some other tests,
like in /test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161188 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-02 18:12:06 +00:00
Howard Hinnant
5fec82dc0d
Implement [util.smartptr.shared.atomic]. This is the last unimplemented
...
section in libc++. This requires a recompiled dylib. Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.
The implementation is not lock free. After considerable thought, I know of no
way to make the implementation lock free. Ideas welcome along that front. But
changing the ABI of shared_ptr is not on the table at this point.
The mutex used to lock these function is encapsulated by std::__sp_mut. The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members. Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex. That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.
I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks. Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait). In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).
The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr. The constant 16 is a ball-park reasonable space/time
tradeoff.
std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function. I had thought we had already done this, but I was mistaken.
All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160940 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-30 01:40:57 +00:00
Howard Hinnant
ca8eb830dd
<algorithm> no longer needs to include <cstdlib>, but can get away with just <cstddef>. This was brought to my attention by Salvatore Benedetto in his port to a bare-metal coretex-m3. This exposed two test bugs where an explicit #include <cstdlib> was needed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160786 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 17:09:09 +00:00
Howard Hinnant
499c61f999
noexcept and constexpr applied to <mutex>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160604 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 16:13:09 +00:00
Howard Hinnant
f57bd564fd
noexcept and constexpr applied to <ios>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160593 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 01:03:40 +00:00
Howard Hinnant
410f2def47
constexpr applied to <complex>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160585 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 22:18:27 +00:00
Howard Hinnant
fe4c9dd747
Relax the tolerances on some timing tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160566 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 19:48:05 +00:00
Howard Hinnant
d06a640ba7
noexcept applied to <iterator>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160565 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 19:36:34 +00:00
Howard Hinnant
08bce1754d
constexpr applied to <array>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160564 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 19:20:49 +00:00
Howard Hinnant
c425307238
Relax the complete-type checks that are happening under __invokable<Fp, Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160285 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 16:17:34 +00:00
Howard Hinnant
473f838128
Applied constexpr to <chrono>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160184 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 19:17:27 +00:00
Howard Hinnant
1ca23672a0
Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to Jonathan Coxhead for reporting this bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160136 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12 18:07:41 +00:00
Howard Hinnant
d586248597
Add test for self-referencing emplace test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159921 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 02:47:43 +00:00
Howard Hinnant
90d8723476
Apply constexpr to <bitset>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159899 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 17:04:52 +00:00
Howard Hinnant
5394c1ed30
Give tuple a constexpr default constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159857 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 20:39:45 +00:00
Howard Hinnant
71499ad176
Add noexcept test for offsetof macro per [support.types]/p4.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159846 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 18:39:01 +00:00
Howard Hinnant
7a44515588
This commit establishes a new bucket_count policy in the unordered containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:31:14 +00:00
Howard Hinnant
caee2b093f
Fix a few testsuite bugs involving trailing null (or lack thereof) in strstream.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157832 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01 20:02:59 +00:00
Howard Hinnant
635ce1d127
The rules for emplace in map, multimap, unordered_map and unordered_multimap changed a while back and I'm just now updating to these new rules. In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors. I made one extension: If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157503 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-25 22:04:21 +00:00
Richard Smith
9efdc0bd5f
libc++: Add some missing #includes to atomics tests. libc++ doesn't need these
...
at the moment, but they allow these tests to be used to test clang against
libstdc++. Add myself to the credits file, as suggested by Howard.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@155085 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 00:50:47 +00:00
David Chisnall
d3eca759a2
Fix the remaining atomic tests, all of which were wrong for the case where a
...
compare-and-exchange failed (it should update the expected value to the current
value, and the tests were checking that it didn't...).
Results of the atomics part of the test suite on FreeBSD with clang trunk and
the atomic.c from compiler-rt (currently kludged into the test, not installed
properly):
****************************************************
Results for /root/libc++/test/atomics:
using clang version 3.1 (trunk 153415)
Target: x86_64-unknown-freebsd10.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -pthread /tmp/atomic.o
----------------------------------------------------
sections without tests : 0
sections with failures : 0
sections without failures: 14
+ ----
total number of sections : 14
----------------------------------------------------
number of tests failed : 0
number of tests passed : 52
+ ----
total number of tests : 52
****************************************************
Yay!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-05 13:48:16 +00:00
David Chisnall
1ee87fa41a
Fix test cases that were trying to make atomic things that are not trivially copyable.
...
Now all of the test cases compile. Some of them even run!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154094 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-05 13:23:08 +00:00
Howard Hinnant
8efd3dac5d
Update <random> with constexpr support. Patch contributed by Jonathan Sauer.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 21:00:45 +00:00
Howard Hinnant
2cf89a71df
Fix test for default constructor of discrete_distribution. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=12436 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 15:00:14 +00:00
Howard Hinnant
dc1345fd44
I believe tuple is still under development in the standard. Daniel Krugler is/will be making convincing arguments that a modified form of LWG 2051 (currently NAD Future) is easily acheivable and desirable. He has demonstrated that a tuple<T...> where all of the T are implicitly convertible from U... should have a tuple constructor that is also implicit, instead of explicit. This would support the use cases in LWG 2051 while not undermining T... with explicit conversions from U.... This check-in is an experimental implementation of Daniel's work. I believe this work to be mature enough to warrant inclusion into libc++. If anyone sees real-world problems that this check in causes, please let me know and I will revert it, and provide the feedback to the LWG.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153855 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-01 23:10:42 +00:00
Howard Hinnant
87c61a61fe
Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-19 15:40:23 +00:00
David Chisnall
b407d45d83
Don't refer to a function that doesn't exist in the quick_exit test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 14:02:15 +00:00
Jeffrey Yasskin
558ae17391
Fix moneypunct_byname algorithm to more accurately represent C locales in C++.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 18:31:43 +00:00
David Chisnall
f2b2cc6440
Make the failure reporting in testit a bit more useful.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:00:44 +00:00
Howard Hinnant
a231c37df7
update test for explicit bool operator.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151461 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 21:43:14 +00:00
Howard Hinnant
896baa2547
Silence some warnings in a test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151451 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 20:04:11 +00:00
Howard Hinnant
4300839b5f
Hook up to the new clang __is_trivially_constructible and __is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151406 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 23:32:26 +00:00
Dave Zarzycki
b9344c218b
Use Xcode relative compilers when possible
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 00:20:30 +00:00
Howard Hinnant
3fadda314a
Modernize relational operators for shared_ptr and unique_ptr. This includes adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151084 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21 21:02:58 +00:00
Howard Hinnant
6df1412ca6
Relax pointer output test to accept glibc's output. Patch supplied by Jeffrey Yasskin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150927 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 14:51:01 +00:00
Howard Hinnant
01198b313c
Exercise rvalue arguements to make_shared for C++11 mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 20:12:03 +00:00
Howard Hinnant
2848444954
tuple was accidentally lacking a valid copy assignment operator. It went undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150613 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 20:13:52 +00:00
Howard Hinnant
b04ad4162d
Do not parse sign if a sign is not the next legal character when parsing floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 19:19:37 +00:00
Howard Hinnant
8e50a9cf73
Remove quotes from locale name identifier. Credit Edward Meewis.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146655 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15 15:01:38 +00:00
Howard Hinnant
40c13d31c5
Starting using murmur2 when combining multiple size_t's into a single hash, and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145795 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-05 00:08:45 +00:00
Howard Hinnant
f836d531b4
unord test fixes by Edward Meewis
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145707 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 21:23:14 +00:00
Howard Hinnant
f6d875f7f5
Fix http://llvm.org/bugs/show_bug.cgi?id=11428 . Fix provided by Alberto Ganesh Barbati
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145698 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02 19:36:40 +00:00
Howard Hinnant
ce6884cc76
Fix ratio arithmetic with zero
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@143519 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-01 23:13:37 +00:00
Howard Hinnant
b97de44471
Fix <rdar://problem/10256836> getline of an empty string mistakenly causes failure
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141506 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-09 15:20:46 +00:00
Howard Hinnant
c6fe8cafc3
Fix <rdar://problem/10255403> match_results::begin() is off by one
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141494 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-08 14:36:16 +00:00
Howard Hinnant
c0d0cbad9e
Windows porting work by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141003 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-03 15:23:59 +00:00
Howard Hinnant
8452d21f41
Updated testit to run on Windows and fresh Windows results by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140950 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-01 15:34:27 +00:00
Howard Hinnant
1c3ec6d480
Another installment on debug mode. This addresses list. However this should be considered a temporary state. The API of the debug database and how vector and list use it, is unsatisfactory at the moment. It is both inefficient and overly verbose. I wanted to get this functionality checked in though. In the next day or so I'll refactor what is there in an attempt to streamline things.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140660 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 23:55:03 +00:00
Howard Hinnant
59832523ac
Fix test bugs found by David Chisnall
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140271 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 18:33:46 +00:00
David Chisnall
9e02b90405
Fix locales used in re tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 17:38:03 +00:00
David Chisnall
2fb1a9d1e8
Remove undefines in cstdio test. Fix these properly rather than bodging the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140264 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 17:37:18 +00:00
David Chisnall
86698890db
More +.UTF-8 fixes.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140262 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 17:35:42 +00:00
Howard Hinnant
709c3d27f5
Fix failure found by David Chisnall
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140255 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 16:42:32 +00:00
David Chisnall
db2e99f852
More fixes to the tests. Add UTF-8 encoding to all locales that don't specify one. Undefine some stdio.h macros that break the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140252 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 14:59:10 +00:00
David Chisnall
a824f53600
Fully-qualify some more locales in the tests...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140251 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 14:48:49 +00:00
David Chisnall
eb2c855c44
Don't check STREAMS error numbers on systems that don't implement the obsolete (as described in POSIX2008) XSI STREAMS extension.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140248 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 12:23:11 +00:00
David Chisnall
6b8ac3acda
More locale cleanups. Fully specify locales in iostream tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140247 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 12:09:17 +00:00
David Chisnall
e2f2a15066
Localisation test fixes to make the tests pass on FreeBSD, which does not provide shortened forms of the various locales (e.g. en_US, rather than en_US.UTF-8 / en_US.ISO{whatever}).
...
Reviewed by Howard Hinnant.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140242 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 08:19:20 +00:00
Howard Hinnant
0442b12591
The vector test suite now passes for no-debug, debug-lite and debug-regular
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139930 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-16 18:41:29 +00:00
Howard Hinnant
92a836c03d
Reimplemented much of <istream> such that single character extractions do not check to see if this is the last character in the stream and thus never set eofbit. This fixes http://llvm.org/bugs/show_bug.cgi?id=10817 . This fix requires a recompiled libc++.dylib to be fully implemented. The recompiled libc++.dylib is ABI compatible with that shipped on Lion.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@138961 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-01 21:02:45 +00:00
Howard Hinnant
e3e3291f3a
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 21:56:02 +00:00
Howard Hinnant
bf6666f7a0
Correct test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-19 01:07:49 +00:00
Sean Hunt
541cb301a1
Adjust two tests to account for a nasty change in copying behavior
...
between C++03 and C++0x and its effect on exceptions, and another two to
not test move construction when rvalue references are not available.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135445 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 23:51:25 +00:00
Sean Hunt
13aaf422e4
Make all fstream tests use tmpnam if creating files, rather than
...
hard-coded names.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135444 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 23:51:21 +00:00
Sean Hunt
e6440c6fa2
Do a litmus test of using tmpnam to generate safe temporary file names
...
for the tests that open new data files.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135422 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 20:46:16 +00:00
Sean Hunt
737a351850
Given that __underlying_type is now available in clang, implement
...
std::underlying_type.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135410 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 18:37:21 +00:00
Sean Hunt
2d81f3d1f3
Give A an explicitly non-throwing destructor so that B's destructor is
...
itself non-throwing. Since nested_exception's destructor is
non-throwing, if B's destructor is not, this causes an error in C++03
mode due to the overriding function having a more lax specification.
This did not occur in C++0x mode as A's destructor was implicitly
non-throwing.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135400 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 17:07:53 +00:00
Sean Hunt
a78264f872
Fix wchar tests by not assuming that tm is complete and by using the
...
proper va_list time on non-darwin platforms.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@135247 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 05:44:47 +00:00
Howard Hinnant
ac6de546bd
Fixing up some ABI issues
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134639 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-07 21:03:52 +00:00
Sean Hunt
12c3d374a5
<inttypes.h> does not necessarily include <stdint.h>. Accordingly, do
...
not test for this.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134531 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06 20:52:28 +00:00
Howard Hinnant
61aa6013c3
Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134248 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-01 19:24:36 +00:00
Howard Hinnant
a2a08b43ee
test for pair piecewise construction
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133667 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 23:51:19 +00:00
Howard Hinnant
58cd8231d8
noexcept for <stack>. This completes noexcept for Chapter 23 [containers].
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132652 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 22:09:19 +00:00
Howard Hinnant
6a09441022
noexcept for <queue>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132650 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 21:32:33 +00:00
Howard Hinnant
04dae1df22
noexcept for <unordered_set>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 20:18:37 +00:00
Howard Hinnant
5f2f14c5d2
noexcept for <unordered_map>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 18:54:24 +00:00
Howard Hinnant
b2e2a8f6f3
noexcept for <set>. Plus a few fixes to noexcept for <map>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132640 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 15:22:34 +00:00
Howard Hinnant
7686add61e
noexcept for <map>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132639 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 14:31:57 +00:00
Howard Hinnant
d1d27a4afa
noexcept for <vector>. This also includes installing move_if_noexcept() into vector.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 19:40:40 +00:00
Howard Hinnant
53f7d4cc62
Bring noexcept for <string> inline with other containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132573 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 18:40:47 +00:00
Howard Hinnant
c560727d5e
noexcept for <list>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132562 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 17:30:28 +00:00
Howard Hinnant
b965fed10b
noexcept for <forward_list>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132553 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 16:20:53 +00:00
Howard Hinnant
009b2c4583
After sleeping on it I've decided that all special members that can be noexcept, should be declared so. The client has the traits to detect and branch on this information, and it is often an important optimization. Give deque() a noexcept. Add test for deque default constructor and deque destructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132549 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 15:16:49 +00:00
Howard Hinnant
93f2764b16
Add noexcept tests for deque.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132523 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 01:46:22 +00:00
Howard Hinnant
1694d23e23
noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132261 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 14:41:13 +00:00
Howard Hinnant
0148a838d0
Simplied bind using __invoke. In the process, found and fixed a couple of bugs. C++11 only.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131667 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-19 19:41:47 +00:00
Howard Hinnant
3dd965bdf9
This commit was accidental. Reverting.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131514 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 00:47:00 +00:00
Howard Hinnant
932209b344
A bunch of future tests got invalidated with the latest updates to thread. Fixed the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131509 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-17 23:32:48 +00:00
Howard Hinnant
6cbf9f9b25
Fix and beef up test bug for move_if_noexcept
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131483 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-17 20:10:42 +00:00
Howard Hinnant
97ecd64913
Clean up a bunch of warnings in the tests, 3 of which actually turned out to be test bugs.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131479 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-17 19:12:55 +00:00
Howard Hinnant
ad935d583d
Brought call_once variadic call up to current spec, which allows move-only functors and move-only arguments, but disallows functors with non-const lvalue reference parameters.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131414 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 19:05:11 +00:00
Howard Hinnant
656bdc3667
Brought thread variadic constructor up to current spec, which allows move-only functors and move-only arguments, but disallows functors with non-const lvalue reference parameters.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131413 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 18:40:35 +00:00
Howard Hinnant
37c53b6221
Redesign of result_of to handle reference-qualified member functions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131407 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-16 16:17:21 +00:00
Howard Hinnant
f6cc833ae7
Warning suppression in test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131344 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 15:38:08 +00:00
Howard Hinnant
783b810cae
Warning suppression in test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131343 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 15:36:25 +00:00
Howard Hinnant
a5a0ba86c8
Warning suppression in test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131341 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 14:53:12 +00:00
Howard Hinnant
e80c36e27b
Correction to hexfloat hack.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131340 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 14:33:56 +00:00
Howard Hinnant
d515df2a50
Fix test bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131328 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 00:07:53 +00:00
Howard Hinnant
f1151efcb1
Suppress some warings in the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131327 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-14 00:04:05 +00:00
Howard Hinnant
2d01bf0665
Suppress some warings in the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131326 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-13 23:59:50 +00:00
Howard Hinnant
0a111118a6
http://llvm.org/bugs/show_bug.cgi?id=9854 . Also created an emulated hexfloat literal for use in some of the tests. <sigh> And cleaned up some harmless but irritating warnings in the tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131318 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-13 21:52:40 +00:00
Howard Hinnant
6063ec176d
A much improved type_traits for C++0x. Not yet done: is_trivially_constructible, is_trivially_assignable and underlying_type.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-13 14:08:16 +00:00
Howard Hinnant
6b41c6047b
Corrected some bugs in both memory and the tests. Preparing for being able to turn on support for alias templates.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131199 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 20:21:19 +00:00
Howard Hinnant
ef3b2e2e34
Fix bug in Sseq constraints found by Seth Cantrell
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@129285 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 18:22:12 +00:00
Howard Hinnant
3e93e96dff
Corrected tests for http://llvm.org/bugs/show_bug.cgi?id=9351
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@128807 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04 01:42:30 +00:00
Howard Hinnant
b8a03c763a
... And these wonderful tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@128797 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-03 20:06:31 +00:00
Nick Kledzik
770a3c5116
<rdar://problem/9073695> std::uncaught_exception() becomes true before evaluating the throw-expression rather than after
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@127499 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-11 22:33:07 +00:00
Howard Hinnant
6e5e7e78ee
Corrected const-correctness on nullptr type_traits, and beefed up the test for nullptr_t.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@127338 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09 17:17:06 +00:00
Howard Hinnant
e7c8da6f2d
http://llvm.org/bugs/show_bug.cgi?id=9326
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@126504 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 19:52:41 +00:00
Howard Hinnant
c4cbb5b6b7
Update testit to default to clang
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@125498 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 18:06:10 +00:00
Howard Hinnant
211f0ee1be
Bug 9096 - list::iterator not default constructible
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124508 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 23:46:28 +00:00
Howard Hinnant
80f9180729
minor corrections to test, and hook is_base_of up to clang intrinsic
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 20:00:37 +00:00
Howard Hinnant
4ff9d3599c
placeholder test
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124193 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-25 16:32:04 +00:00
Douglas Gregor
f9e1c7e367
Eliminate the C++0x-only is_convertible testing function that accepts
...
a cv-qualifier rvalue reference to the type, e.g.,
template <class _Tp> char __test(const volatile typename remove_reference<_Tp>::type&&);
The use of this function signature rather than the more
straightforward one used in C++98/03 mode, e.g.,
template <class _Tp> char __test(_Tp);
is broken in two ways:
1) An rvalue reference cannot bind to lvalues, so is_convertible<X&,
X&>::value would be false. This breaks two of the unique_ptr tests
on Clang and GCC >= 4.5. Prior GCC's seem to have allowed rvalue
references to bind to lvalues, allowing this bug to slip in.
2) By adding cv-qualifiers to the type we're converting to, we get
some incorrect "true" results for, e.g., is_convertible<const X&, X&>::value.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124166 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-25 01:15:41 +00:00
Chandler Carruth
e76496ce46
Teach the Lit configuration to actually use the cxx0x setting when
...
constructing compile flags, and to link against the 'rt' library on
Linux for clock_gettime and friends.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124052 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23 01:05:20 +00:00
Howard Hinnant
0e1493ec5e
LWG 1385 [FCD] tuple_cat should be a single variadic signature ( http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#1385 ). This issue is only in Ready status, meaning it is not official, but probably will be this March in Madrid. It was tentatively accepted in Batavia with the previso that Bill and I didn't have any problems implementing it. This is my part of that agreement.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-11 20:47:50 +00:00
Michael J. Spencer
626916fc25
Add CMake build and fix major Linux blockers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:47:54 +00:00
Howard Hinnant
b8f787b188
Test adjustment for recent changes in allocator_traits
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:22:37 +00:00
Howard Hinnant
f190e97885
This got accidentally removed
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121502 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:22:00 +00:00
Howard Hinnant
31aaf55f4c
N3158 Missing preconditions for default-constructed match_result objects
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-08 21:07:55 +00:00
Howard Hinnant
1b18a48e28
cleaning up...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-08 20:09:09 +00:00
Howard Hinnant
770d1c4ea7
After a long break to wait for the atomic spec to settle, this completes the library part of <atomic>. It currently won't even parse as it depends on the existence of the intrinsics specified at http://libcxx.llvm.org/atomic_design_a.html . Everything has been tested using fake intrinsics which have now been removed. As the intrinsics come online, the ATOMIC_* macros will need to be adjusted to reflect which operations are lock-free. These macros will probably need to be #ifdef'd for each supported platform.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-08 17:20:28 +00:00
Michael J. Spencer
c9f5d9fca6
test: Rename string_op+= to string_op_plus_equal. Windows git doesn't like it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-08 17:06:47 +00:00
Howard Hinnant
f02417b600
atomics ...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 23:20:28 +00:00
Howard Hinnant
91e2f26fec
Work on <atomic> continues. The file size is actually sane now...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 20:46:14 +00:00
Howard Hinnant
4777bf2799
Getting <atomic> warmed back up. We have a hopefully more stable spec now. And I believe the intrinsic spec at http://libcxx.llvm.org/atomic_design_a.html is still good.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-06 23:10:08 +00:00
Howard Hinnant
a445151f4a
N3189 Observers for the three handler functions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 16:45:21 +00:00
Howard Hinnant
7de47902d0
Implemented N3194
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120458 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-30 20:23:32 +00:00
Howard Hinnant
c706565c88
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 22:13:07 +00:00
Howard Hinnant
6051e24e45
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:55:56 +00:00
Howard Hinnant
adaa6266fe
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:55:36 +00:00
Howard Hinnant
8771430346
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:47:09 +00:00
Howard Hinnant
afff5aacd6
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:26:48 +00:00
Howard Hinnant
17c3a81048
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:25:10 +00:00
Howard Hinnant
6587dfe980
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120040 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:21:36 +00:00
Howard Hinnant
73d2f94f6b
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 19:52:19 +00:00
Howard Hinnant
091f2ab44f
Update testsuite strucuture to latest draft
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120029 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 19:15:49 +00:00
Howard Hinnant
6689564040
N3188 - Revision to N3113: Async Launch Policies (CH 36)
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 18:33:54 +00:00
Howard Hinnant
f8f852138f
N3191: C++ Timeout Specification
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-20 19:16:30 +00:00
Howard Hinnant
f048fe3a09
N3123
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-20 18:25:22 +00:00
Howard Hinnant
1468b668aa
N3142. Many of these traits are just placeholders with medium quality emulation; waiting on compiler intrinsics to do it right.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119854 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-19 22:17:28 +00:00
Howard Hinnant
995676a98e
LWG 1522
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 17:34:48 +00:00
Howard Hinnant
2f6a627394
LWG 1339
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 16:13:03 +00:00
Howard Hinnant
47761071be
LWG 1404
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 01:40:00 +00:00
Howard Hinnant
34d6b19721
LWG 1325
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119571 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 21:53:14 +00:00
Howard Hinnant
7b2cb48cc1
LWG 1323
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 21:11:40 +00:00
Howard Hinnant
cd2254b454
LWG 1191
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119545 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 19:52:17 +00:00
Howard Hinnant
86ed8aefb2
LWG 1118
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17 19:22:43 +00:00
Howard Hinnant
b64f8b07c1
license change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 22:09:02 +00:00
Howard Hinnant
726a76fb47
I have reverted all contributions made by Jesse Towner in revision 110724
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:10:23 +00:00
Howard Hinnant
bce9c3132d
[atomics.types.address]
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@117033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21 17:44:19 +00:00
Howard Hinnant
5bbe97ddaa
atomic_schar, atomic_uchar, atomic_short, atomic_ushort, atomic_int, atomic_uint, atomic_long, atomic_ulong, atomic_llong, atomic_ullong, atomic_char16_t, atomic_char32_t and atomic_wchar_t.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@116860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 21:22:10 +00:00
Howard Hinnant
e738501eb3
atomic_char
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@116813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 16:51:18 +00:00
Howard Hinnant
0d5dff1897
Fix two test bugs
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@116515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 21:08:32 +00:00
Howard Hinnant
251aaa1064
Relaxing timing test a bit to avoid spurious test failures under load
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@115920 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 16:25:31 +00:00
Howard Hinnant
611fdaf229
Still working on the basic design of <atomic>. I'm working towards a system by which the compiler only needs to define the strongest intrinsics it can. Weaker atomics in the library automatically try stronger and stronger variants, picking the weakest compiler intrinsic available. If no compiler intrinsics are available for a given operation, the library locks a mutex and does the job. Better documentation to follow...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@115538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 18:52:54 +00:00
Howard Hinnant
79101aec3a
[atomics.flag] completed. Initialization is not working on clang and can't be made to work without defaulted default constructors.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@115207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30 21:05:29 +00:00
Howard Hinnant
767ae2b483
Contemplating this <atomic> reorganization...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@115087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 21:20:03 +00:00
Howard Hinnant
c260b06366
Didn't mean to commit that one
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@115058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 18:33:45 +00:00
Howard Hinnant
ed760f40b7
Wrestling with the slowly dawning realization that <atomic> isn't implementable on any compiler at my disposal...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@115054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 18:13:54 +00:00
Howard Hinnant
0ce02245a9
fixing whitespace
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-28 17:19:10 +00:00
Howard Hinnant
d1176e29b0
[atomics.order]
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114966 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-28 17:13:38 +00:00
Howard Hinnant
8f73c63658
Getting started on <atomic>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 21:17:38 +00:00
Daniel Dunbar
611581b853
tests/lit: Split options into two groups, so we don't get driver warnings about
...
unused linker arguments for compile only tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 04:31:58 +00:00
Daniel Dunbar
26a43c25d7
tests: Remove some stray cleanup code.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 04:18:37 +00:00
Daniel Dunbar
7e0c57b203
tests: Fixup lit config, which got garbled somehow...
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 04:11:29 +00:00
Daniel Dunbar
f5eadcd8d5
tests: Sketch a lit config for running libc++ tests; currently expects libc++ to have been installed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 03:57:04 +00:00
Howard Hinnant
e764f0b648
Updated by-chapter-summary with weekly test results, and fixed up some bad paths in some tests caused by aligning the test suite with N3126.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113403 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 20:31:42 +00:00
Howard Hinnant
745d473ac1
Hooked the following up to clang: is_class, is_enum, has_nothrow_copy_assign, has_trivial_destructor, has_virtual_destructor, is_pod. Implemented has_copy_assign.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 17:55:32 +00:00