summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* Workaround new -Wshadow warning introduced by r293599Alex Lorenz2017-01-311-1/+1
| | | | llvm-svn: 293619
* Fix PR#31779: basic_string::operator= isn't exception safe.Marshall Clow2017-01-311-0/+81
| | | | llvm-svn: 293599
* Implement LWG2556: Wide contract for future::share()Marshall Clow2017-01-241-0/+6
| | | | llvm-svn: 292992
* Change the return type of emplace_[front|back] back to void when building ↵Marshall Clow2017-01-249-9/+165
| | | | | | with C++14 or before. Resolves PR31680. llvm-svn: 292990
* Remove auto_ptr in C++17. Get it back by defining ↵Marshall Clow2017-01-2417-1/+31
| | | | | | _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR llvm-svn: 292986
* Add a test to make sure that implicit conversion from error_code to bool ↵Marshall Clow2017-01-241-0/+30
| | | | | | will fail llvm-svn: 292969
* Implement LWG2733: [fund.ts.v2] gcd / lcm and bool. We already did tbis for ↵Marshall Clow2017-01-248-0/+200
| | | | | | C++17, so replicate the changes in experimental. llvm-svn: 292962
* Mark LWG2736 as complete. No code changes, but we have more tests nowMarshall Clow2017-01-242-3/+35
| | | | llvm-svn: 292958
* A couple more tests for constexpr stuff in string_view. No changes other ↵Marshall Clow2017-01-242-0/+38
| | | | | | than test code. llvm-svn: 292943
* Fix bad XFAIL which recent LIT changes diagnosedEric Fiselier2017-01-241-1/+1
| | | | llvm-svn: 292905
* Remove all usages of REQUIRES-ANY in the test suite.Eric Fiselier2017-01-247-7/+7
| | | | | | | | | Pending LIT changes are about to remove the REQUIRES-ANY keyword in place of supporting boolean && and || within "REQUIRES". This patch prepares libc++ for that change so that when applied the bots don't lose their mind. llvm-svn: 292901
* Implement LWG#2778: basic_string_view is missing constexpr.Marshall Clow2017-01-231-0/+50
| | | | llvm-svn: 292823
* Revert previous cleanup; I got too agressive removing #ifdefsMarshall Clow2017-01-231-0/+2
| | | | llvm-svn: 292809
* Removed some un-needed ifdefsMarshall Clow2017-01-231-2/+0
| | | | llvm-svn: 292806
* Fix recent build errorsEric Fiselier2017-01-212-2/+7
| | | | llvm-svn: 292689
* Implement P0513R0 - "Poisoning the Hash"Eric Fiselier2017-01-2118-10/+450
| | | | | | | | | | | | | | | | | | | | | Summary: Exactly what the title says. This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it. See http://wg21.link/P0513R0 for more info. If there are no comments in the next couple of days I'll commit this Reviewers: mclow.lists, K-ballo, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28938 llvm-svn: 292684
* Refactor unique_ptr/shared_ptr deleter test types into single header.Eric Fiselier2017-01-2048-455/+47
| | | | llvm-svn: 292577
* [libcxx] [test] Fix comment typos, strip trailing whitespace.Stephan T. Lavavej2017-01-1841-53/+53
| | | | | | No functional change, no code review. llvm-svn: 292434
* [libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants.Stephan T. Lavavej2017-01-1812-20/+43
| | | | | | | | | | | | | | | | | | MSVC has compiler warnings C4127 "conditional expression is constant" (enabled by /W4) and C6326 "Potential comparison of a constant with another constant" (enabled by /analyze). They're potentially useful, although they're slightly annoying to library devs who know what they're doing. In the latest version of the compiler, C4127 is suppressed when the compiler sees simple tests like "if (name_of_thing)", so extracting comparison expressions into named constants is a workaround. At the same time, using std::integral_constant avoids C6326, which doesn't look at template arguments. test/std/containers/sequences/vector.bool/emplace.pass.cpp Replace 1 == 1 with true, which is the same as far as the library is concerned. Fixes D28837. llvm-svn: 292432
* Fix filesystem::path assignment from {}Eric Fiselier2017-01-182-0/+50
| | | | | | | | Adding `path::operator=(string_type&&)` made the expression `p = {}` ambiguous. This path fixes that ambiguity by making the `string&&` overload a template so it ranks lower during overload resolution. llvm-svn: 292345
* More configuration changes for running the test suite against MSVC's STLEric Fiselier2017-01-183-0/+9
| | | | llvm-svn: 292337
* Add support for running our test suite against MSVC's STLEric Fiselier2017-01-181-2/+2
| | | | llvm-svn: 292326
* Fix type_info's constructor by making it explicit again.Eric Fiselier2017-01-171-0/+14
| | | | | | | In recent changes type_info's private constructor was accidentally made implicit. This patch fixes that. llvm-svn: 292294
* [libcxx] [test] Don't ask whether Incomplete& can be assigned to.Stephan T. Lavavej2017-01-171-1/+0
| | | | | | | | | | | This is the subject of an active NB comment. Regardless of what the Working Paper currently says, asking this question is morally wrong, because the answer can change when the type is completed. C1XX now detects such precondition violations and complains about them; perhaps Clang should too. Fixes D28591. llvm-svn: 292281
* Fix std::string assignment ambiguity from braced initializer lists.Eric Fiselier2017-01-172-0/+58
| | | | | | | | | | When support for `basic_string_view` was added to string it also added new assignment operators from `basic_string_view`. These caused ambiguity when assigning from a braced initializer. This patch fixes that regression by making the basic_string_view assignment operator rank lower in overload resolution by making it a template. llvm-svn: 292276
* Rename new_handler in tests to avoid conflicts with MSVC symbols.Eric Fiselier2017-01-177-14/+14
| | | | | | | On Windows the header new.h defines "new_handler" in the global namespace. llvm-svn: 292177
* Added a workaround for a `-fdelayed-template-parsing` bug.Michael Park2017-01-161-3/+0
| | | | | | | | | | | | | | | Summary: There seems to be an additional bug in `-fdelayed-template-parsing` similar to http://llvm.org/viewvc/llvm-project?view=revision&revision=236063. This is a workaround for it for <variant> to compile with `clang-cl` on Windows. Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D28734 llvm-svn: 292097
* Implement the missing constexpr stuff in <array>. Fixes PR#31645.Marshall Clow2017-01-163-3/+53
| | | | llvm-svn: 292091
* Fix last_write_time tests for filesystems that don't support negative and ↵Jonas Hahnfeld2017-01-141-29/+63
| | | | | | | | | | | very large times Seems to be the case for NFS. Original patch by Eric Fiselier! Differential Revision: https://reviews.llvm.org/D22452 llvm-svn: 292013
* Mark test as UNSUPPORTED on Windows since it hangs foreverEric Fiselier2017-01-141-0/+3
| | | | llvm-svn: 292012
* Implement P0426: Constexpr for std::char_traitsMarshall Clow2017-01-1216-1/+251
| | | | llvm-svn: 291741
* Mark tests as unsupported under libcpp-no-exceptionsRoger Ferrer Ibanez2017-01-102-2/+2
| | | | | | | | | | The destructor of std::promise needs to construct a std::future_error exception so it calls std::make_exception_ptr. But under libcpp-no-exceptions this will trigger an abort. Differential Revision: https://reviews.llvm.org/D27614 llvm-svn: 291550
* Added XFAIL for the apple versions of clang as wellMarshall Clow2017-01-096-0/+6
| | | | llvm-svn: 291475
* Implement P0403R1 - 'Literal suffixes for basic_string_view'. Requires clang ↵Marshall Clow2017-01-096-0/+170
| | | | | | 4.0 (specifically, r290744) llvm-svn: 291457
* [libcxx] [test] Strip trailing whitespace. NFC, no code review.Stephan T. Lavavej2017-01-075-8/+8
| | | | llvm-svn: 291322
* Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANGEric Fiselier2017-01-063-7/+60
| | | | llvm-svn: 291278
* Add gcc-[56] clang-3.[678] to list of XFAILS for variant tests. Patch from ↵Eric Fiselier2017-01-052-4/+8
| | | | | | Michael Park llvm-svn: 291094
* Fix XPASS buildbot failure related to structured bindingsEric Fiselier2017-01-051-1/+1
| | | | | | | | | | | The test was previously set to XFAIL if __cpp_structured_bindings wasn't defined. However there are Clang 4.0 versions which do not define this macro but do provide structured bindings, which causes the test to pass unexpectedly. This patch changes the XFAIL to an UNSUPPORTED. llvm-svn: 291060
* Fix PR26961 - Add default constructor to std::pointer_safety struct.Eric Fiselier2017-01-051-0/+12
| | | | | | | | In ABI v1 libc++ implements std::pointer_safety as a class type instead of an enumeration. However this class type does not provide a default constructor as it should. This patch adds that default constructor. llvm-svn: 291059
* Fix std::pointer_safety type in ABI v2Eric Fiselier2017-01-051-0/+2
| | | | | | | | | | | | | | | | | | | | In the C++ standard `std::pointer_safety` is defined as a C++11 strongly typed enum. However libc++ currently defines it as a class type which simulates a C++11 enumeration. This can be detected in valid C++ code. This patch introduces an the _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE ABI option. When defined `std::pointer_safety` is implemented as an enum type. Unfortunatly this also means it can no longer be provided as an extension in C++03. Additionally this patch moves the definition for `get_pointer_safety()` out of the dylib, and into the headers. New usages of `get_pointer_safety()` will now use the inline version instead of the dylib version. However in order to keep the dylib ABI compatible the old definition is explicitly compiled into it. llvm-svn: 291046
* Fix verify test on 32 bit systemsEric Fiselier2017-01-041-1/+1
| | | | llvm-svn: 291031
* Implement P0505: 'Wording for GB 50'Marshall Clow2017-01-0410-16/+190
| | | | llvm-svn: 291028
* Use C++11 static_assert in variant tests. Patch from Michael ParkEric Fiselier2017-01-041-2/+2
| | | | llvm-svn: 291021
* [libcxx] Re-implement LWG 2770 again: Fix tuple_size to work with structured ↵Eric Fiselier2017-01-045-18/+307
| | | | | | | | | | | | | | | | | | | bindings Summary: This patch attempts to re-implement a fix for LWG 2770, but not the actual specified PR. The PR for 2770 specifies tuple_size<T const> as only conditionally providing a `::value` member. However C++17 structured bindings require `tuple_size<T const>` to be complete only if `tuple_size<T>` is also complete. Therefore this patch implements only provides the specialization `tuple_size<T CV>` iff `tuple_size<T>` is a complete type. This fixes http://llvm.org/PR31513. Reviewers: mclow.lists, rsmith, mpark Subscribers: mpark, cfe-commits Differential Revision: https://reviews.llvm.org/D28222 llvm-svn: 291019
* Implement the last bit of P0031: 'A Proposal to Add Constexpr Modifiers to ↵Marshall Clow2017-01-043-6/+109
| | | | | | reverse_iterator, move_iterator, array and Range Access' for C++17 llvm-svn: 290976
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-01-045-5/+5
| | | | | | Fixes D27786. llvm-svn: 290922
* [libcxx] [test] Fix recently introduced warnings emitted by MSVC.Stephan T. Lavavej2017-01-044-0/+16
| | | | | | | | | | These tests were using malloc()'s return value without checking for null, which MSVC's /analyze rightly warns about. Asserting that the pointer is non-null both expresses the test's intention and silences the warning. Fixes D27785. llvm-svn: 290921
* Re-implement LWG 2770 - Fix tuple_size with structured bindings.Eric Fiselier2017-01-023-24/+16
| | | | | | | This patch implements the correct PR for LWG 2770. It also makes the primary tuple_size template incomplete again which fixes part of llvm.org/PR31513. llvm-svn: 290846
* Fix some 'FIXME's in the tests.Marshall Clow2016-12-304-18/+10
| | | | llvm-svn: 290758
* Recommit r290750: Fix PR19460 - std::ios is convertible to int.Eric Fiselier2016-12-301-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two problems with the initial fix. 1. The added tests flushed out that we misconfigured _LIBCPP_EXPLICIT with GCC. 2. Because the boolean type was a member function template it caused weird link errors. I'm assuming due to the vague linkage rules. This time the bool type is a non-template member function pointer. That seems to have fixed the failing tests. Plus it will end up generating less symbols overall, since the bool type is no longer per instantiation. original commit message below ----------------------------- std::basic_ios has an operator bool(). In C++11 and later it is explicit, and only allows contextual implicit conversions. However explicit isn't available in C++03 which causes std::istream (et al) to have an implicit conversion to int. This can easily cause ambiguities when calling operator<< and operator>>. This patch uses a "bool-like" type in C++03 to work around this. The "bool-like" type is an arbitrary pointer to member function type. It will not convert to either int or void*, but will convert to bool. llvm-svn: 290754
OpenPOWER on IntegriCloud