summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* PR12597: Remove "chown -R root:wheel" from the makefile.Bob Wilson2013-04-231-1/+0
| | | | llvm-svn: 180122
* Zero-initialize all mbstate_t in the codecvt tests.Howard Hinnant2013-04-2313-15/+15
| | | | llvm-svn: 180108
* Modest performance improvement for std::string's operator==.Howard Hinnant2013-04-221-7/+28
| | | | llvm-svn: 180072
* Somehow aligned_union got dropped through the cracks. This adds it. Did a ↵Howard Hinnant2013-04-224-11/+107
| | | | | | drive-by fix of alignment_of while I was in the neighborhood. llvm-svn: 180036
* After years of telling people: 'If you ever find any of my code that ↵Howard Hinnant2013-04-182-1/+9
| | | | | | 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. llvm-svn: 179760
* I believe this finishes up debug mode for list. The testing is a little ↵Howard Hinnant2013-04-164-1/+37
| | | | | | weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on. llvm-svn: 179632
* Added extra space to end of EXTRA_FLAGS in buildit. This fixes ↵Howard Hinnant2013-04-161-1/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15761 llvm-svn: 179609
* addressof misbehaving for type with an implicit conversion operator to ↵Howard Hinnant2013-04-162-1/+19
| | | | | | char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754 llvm-svn: 179608
* Numeric parsing was getting the wrong answer when faced with very long ↵Howard Hinnant2013-04-152-16/+144
| | | | | | inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740 llvm-svn: 179556
* Accidentally disallowed explicit tuple conversions when all elements of the ↵Howard Hinnant2013-04-142-1/+10
| | | | | | tuple can be explicitly converted. llvm-svn: 179467
* Set failbit when strtold sets errno to ERANGE when parsing floating point ↵Howard Hinnant2013-04-132-0/+55
| | | | | | values. llvm-svn: 179461
* Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of ↵Howard Hinnant2013-04-121-2/+15
| | | | | | macros) on Windows only to quell a warning during libc++ building. llvm-svn: 179408
* Change <cwchar> and <cstring> to look out for flags which may or may not be ↵Howard Hinnant2013-04-082-8/+17
| | | | | | set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr. This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there. llvm-svn: 179041
* Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.Howard Hinnant2013-04-053-4/+45
| | | | llvm-svn: 178892
* More list debug mode tests.Howard Hinnant2013-04-056-0/+228
| | | | llvm-svn: 178873
* More work on debug mode for list.Howard Hinnant2013-04-057-0/+87
| | | | llvm-svn: 178819
* Somehow search_n never got tested, so of course it had a bug in it. This ↵Howard Hinnant2013-04-043-1/+222
| | | | | | fixes http://llvm.org/bugs/show_bug.cgi?id=15667. llvm-svn: 178764
* Fix stupid but harmless type-o. Fixes ↵Howard Hinnant2013-04-031-2/+2
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15657. llvm-svn: 178691
* The move / swap members were not correctly taking all of the possible states ↵Howard Hinnant2013-04-032-40/+161
| | | | | | of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659. llvm-svn: 178690
* Reference: ↵Howard Hinnant2013-04-022-26/+115
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html llvm-svn: 178581
* The cmake script is failing to copy cxxabi.h to the right place because it ↵Howard Hinnant2013-04-021-1/+1
| | | | | | was generating to destination path like so /include// and dstdir can legally be blank from my interpretation of the script, and this would then generate a path like libcxx/include// which is illegal. llvm-svn: 178579
* Richard Smith: It was pointed out to me off-list that libc++'s ↵Howard Hinnant2013-04-022-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 178576
* Some debug test cases for list.Howard Hinnant2013-04-028-0/+324
| | | | llvm-svn: 178565
* Reference: ↵Howard Hinnant2013-04-021-0/+2
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html llvm-svn: 178545
* Reference: ↵Howard Hinnant2013-04-021-5/+14
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.html llvm-svn: 178544
* Test case was forming the wrong limits when size_t != unsigned long.Howard Hinnant2013-03-291-1/+2
| | | | llvm-svn: 178370
* Bruce Mitchener, Jr.: Port to emscripten. Fixes ↵Howard Hinnant2013-03-296-16/+46
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15624. llvm-svn: 178354
* The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are ↵Howard Hinnant2013-03-291-0/+2
| | | | | | disabled, so #ifdef'ing out the test. llvm-svn: 178350
* I believe debug mode for vector<T> (T != bool) is complete. If anyone sees ↵Howard Hinnant2013-03-281-1/+1
| | | | | | anything more they would like to see on it, please let me know. Debug mode is activated by compiling with -D_LIBCPP_DEBUG2=1. Eventually _LIBCPP_DEBUG2 will be renamed to just _LIBCPP_DEBUG. llvm-svn: 178288
* Fix a few warnings/errors for compiling with -fno-exceptions.Howard Hinnant2013-03-285-2/+23
| | | | llvm-svn: 178267
* Second try at r178075. The llvm breakage has been fixed by r178240.Howard Hinnant2013-03-281-16/+64
| | | | llvm-svn: 178253
* Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.Howard Hinnant2013-03-281-0/+2
| | | | llvm-svn: 178237
* Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVMDaniel Dunbar2013-03-272-71/+16
| | | | | | bootstrap with libc++. llvm-svn: 178116
* Tighten up the iterator requirements for the vector member templates. This ↵Howard Hinnant2013-03-262-16/+71
| | | | | | 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. llvm-svn: 178075
* Another vector debug mode test, and a static test on Allocator::value_type. ↵Howard Hinnant2013-03-262-0/+11
| | | | | | This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576. llvm-svn: 178064
* More vector debug tests.Howard Hinnant2013-03-266-0/+103
| | | | llvm-svn: 178033
* Fixed race conditions in thread tests; exposed by UBSanMarshall Clow2013-03-2613-15/+19
| | | | llvm-svn: 178029
* Simply debug mode tests per Dmitri Gribenko's suggestion.Howard Hinnant2013-03-2621-148/+21
| | | | llvm-svn: 178026
* Need one more swap overload for swapping two lvalue vector<bool>::reference's.Howard Hinnant2013-03-262-0/+20
| | | | llvm-svn: 178016
* Added debug tests for indexing, pop_back and both forms of erase. Added an ↵Howard Hinnant2013-03-2510-0/+407
| | | | | | improved error message for erasing a single element with end(). llvm-svn: 177929
* Remove some erroneous code I was using to debug debug mode.Howard Hinnant2013-03-2512-24/+0
| | | | llvm-svn: 177908
* Debug mode tests for vector::front and back.Howard Hinnant2013-03-254-0/+192
| | | | llvm-svn: 177904
* More vector::iterator debug mode tests. Run by adding to OPTIONS ↵Howard Hinnant2013-03-258-7/+346
| | | | | | -D_LIBCPP_DEBUG2=1. llvm-svn: 177897
* Debug mode: learning to crawl. I need to set up some tests that actually ↵Howard Hinnant2013-03-252-1/+56
| | | | | | 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. llvm-svn: 177892
* Marshall Clow found some divide-by-zero warnings with UBSan in rand's ↵Howard Hinnant2013-03-231-25/+65
| | | | | | 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. llvm-svn: 177826
* This is a start at making the libc++ test suite friendlier to the ↵Howard Hinnant2013-03-237-7/+42
| | | | | | -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. llvm-svn: 177824
* Test cleanup with respect to use of deprecated tmpnam function. Also ↵Howard Hinnant2013-03-2225-184/+205
| | | | | | 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 llvm-svn: 177755
* Fix buffer read overflow in money_get::do_get(). Found by UBSanMarshall Clow2013-03-221-1/+1
| | | | llvm-svn: 177694
* Fix undefined behavior in syntax_option_type::operator~ and ↵Marshall Clow2013-03-221-2/+2
| | | | | | match_flag_type::operator./a.out Found by UBSan llvm-svn: 177693
* Fix bug in test; found by AddressSanitizerMarshall Clow2013-03-201-1/+1
| | | | llvm-svn: 177464
OpenPOWER on IntegriCloud