summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r276548 - Make pair/tuples assignment operators SFINAE properly.Eric Fiselier2016-07-255-310/+2
| | | | | | | | | | | | This is a breaking change. The SFINAE required is instantiated the second the class is instantiated, and this can cause hard SFINAE errors when applied to references to incomplete types. Ex. struct IncompleteType; extern IncompleteType it; std::tuple<IncompleteType&> t(it); // SFINAE will blow up. llvm-svn: 276598
* Make dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.comEric Fiselier2016-07-2514-18/+32
| | | | llvm-svn: 276595
* Don't SFINAE pair's copy assignment operator in C++03 mode.Eric Fiselier2016-07-251-0/+36
| | | | | | | | In C++03 mode evaluating the SFINAE can cause a hard error due to access control violations. This is a problem because the SFINAE is evaluated as soon as the class is instantiated, and not later. llvm-svn: 276594
* Mark bucket_count() assertions as non-portable. Patch from STL@microsoft.comEric Fiselier2016-07-25107-349/+458
| | | | llvm-svn: 276593
* Make move_assign_noexcept.pass.cpp tests more portable. Patch from ↵Eric Fiselier2016-07-2512-18/+30
| | | | | | STL@microsoft.com llvm-svn: 276591
* Make swap_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com.Eric Fiselier2016-07-2517-255/+148
| | | | | | See D21820 for more information (https://reviews.llvm.org/D21820). llvm-svn: 276590
* Work around MSVC's non-standard ABI for enums. Patch from STL@microsoft.comEric Fiselier2016-07-253-5/+22
| | | | llvm-svn: 276589
* Fix a non-standard allocator in vector tests. Patch from STL@microsoft.comEric Fiselier2016-07-241-0/+3
| | | | llvm-svn: 276588
* Fix unique_ptr.runtime tests for null inputs. Patch from STL@microsoft.comEric Fiselier2016-07-242-0/+13
| | | | llvm-svn: 276587
* Fix portability issues in <random> tests. Patch from STL@microsoft.comEric Fiselier2016-07-244-6/+19
| | | | llvm-svn: 276585
* Mark bucket() assertions as non-portable. Patch from STL@microsoft.comEric Fiselier2016-07-244-8/+12
| | | | llvm-svn: 276584
* Fix MSVC unreferenced parameter warning. Patch from STL@microsoft.comEric Fiselier2016-07-241-1/+1
| | | | llvm-svn: 276583
* Make move_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.comEric Fiselier2016-07-2414-39/+53
| | | | llvm-svn: 276581
* Make bucket_count() greater-equal assertions portable. Patch from ↵Eric Fiselier2016-07-244-7/+7
| | | | | | STL@microsoft.com llvm-svn: 276580
* Mark bucket_size() assertions as non-portible. Patch from STL@microsoft.comEric Fiselier2016-07-244-48/+52
| | | | llvm-svn: 276578
* Guard libc++ specific tests SFINAE on std::bind's call operator. Patch from ↵Eric Fiselier2016-07-241-3/+5
| | | | | | STL@microsoft.com llvm-svn: 276576
* Make pair/tuples assignment operators SFINAE properly.Eric Fiselier2016-07-244-2/+274
| | | | llvm-svn: 276548
* Fix memory leak in test.Eric Fiselier2016-07-241-0/+4
| | | | llvm-svn: 276547
* Implement LWG 2393. Check for LValue-callability.Eric Fiselier2016-07-243-0/+65
| | | | llvm-svn: 276546
* Implement LWG2328. Rvalue stream extraction should perfect forward.Eric Fiselier2016-07-241-6/+15
| | | | llvm-svn: 276545
* Implement P0040r3: Extending memory management toolsEric Fiselier2016-07-249-0/+871
| | | | llvm-svn: 276544
* Implement the in_place tags from p0032r3.Eric Fiselier2016-07-231-0/+99
| | | | | | | That paper also has changes to any/optional but those will be implemented later. llvm-svn: 276537
* Implement P0392r0. Integrate filesystem::path and string_view.Eric Fiselier2016-07-235-3/+116
| | | | llvm-svn: 276511
* Again, w/o the tabsMarshall Clow2016-07-211-5/+5
| | | | llvm-svn: 276273
* Another fix to appease the no-exception bots.Marshall Clow2016-07-211-7/+11
| | | | llvm-svn: 276272
* Fix some string_view tests that were failing when exceptions were disabled. ↵Marshall Clow2016-07-215-6/+31
| | | | | | Also comment out a _LIBCPP_ASSERT that gcc4.9 was complaining about. Will revisit that later. llvm-svn: 276241
* Implement std::string_view as described in http://wg21.link/P0254R1. ↵Marshall Clow2016-07-2195-5/+17377
| | | | | | Reviewed as https://reviews.llvm.org/D21459 llvm-svn: 276238
* Implement P0084r2. Changing emplace return types.Eric Fiselier2016-07-219-80/+104
| | | | llvm-svn: 276230
* Unbreak traits tests by handling differences between version macros in ↵Eric Fiselier2016-07-202-2/+4
| | | | | | clang/apple-clang. llvm-svn: 276200
* Fix inheriting constructor test for std::function.Eric Fiselier2016-07-201-4/+7
| | | | | | | The test I originally checked in only worked with ToT Clang. This patch updates the test so that it works as far back as 3.5. llvm-svn: 276093
* Unbreak is_constructible tests for Clang <= 3.7.Eric Fiselier2016-07-202-1/+25
| | | | | | | There is a bug in Clang's __is_constructible builtin that causes it to return true for function types; ex [T = void()]. llvm-svn: 276092
* Add missed test in r276090.Eric Fiselier2016-07-201-0/+23
| | | | llvm-svn: 276091
* Reimplement is_constructible fallback implementation. Fixes PR21574.Eric Fiselier2016-07-202-7/+60
| | | | | | | The previous implementation relied highly on specializations to handle special cases. This new implementation lets the compiler do the work when possible. llvm-svn: 276084
* Add SFINAE on additional overloads of std::complex functions. Fixes PR19921.Eric Fiselier2016-07-201-0/+74
| | | | | | | | | | The functions arg, conj, imag, norm, proj, and real have additional overloads for arguments of integral or floating point types. However these overloads should not allow conversions to the integral/floating point types, only exact matches. This patch constrains these functions so they no longer allow conversions. llvm-svn: 276067
* Fix undefined behavior in __treeEric Fiselier2016-07-191-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to fix the undefined behavior in __tree by changing the node pointer types used throughout. The pointer types are changed for raw pointers in the current ABI and for fancy pointers in ABI V2 (since the fancy pointer types may not be ABI compatible). The UB in `__tree` arises because tree downcasts the embedded end node and then deferences that pointer. Currently there are 3 node types in __tree. * `__tree_end_node` which contains the `__left_` pointer. This node is embedded within the container. * `__tree_node_base` which contains `__right_`, `__parent_` and `__is_black`. This node is used throughout the tree rebalancing algorithms. * `__tree_node` which contains `__value_`. Currently `__tree` stores the start of the tree, `__begin_node_`, as a pointer to a `__tree_node`. Additionally the iterators store their position as a pointer to a `__tree_node`. In both of these cases the pointee can be the end node. This is fixed by changing them to store `__tree_end_node` pointers instead. To make this change I introduced an `__iter_pointer` typedef which is defined to be a pointer to either `__tree_end_node` in the new ABI or `__tree_node` in the current one. Both `__tree::__begin_node_` and iterator pointers are now stored as `__iter_pointers`. The other situation where `__tree_end_node` is stored as the wrong type is in `__tree_node_base::__parent_`. Currently `__left_`, `__right_`, and `__parent_` are all `__tree_node_base` pointers. Since the end node will only be stored in `__parent_` the fix is to change `__parent_` to be a pointer to `__tree_end_node`. To make this change I introduced a `__parent_pointer` typedef which is defined to be a pointer to either `__tree_end_node` in the new ABI or `__tree_node_base` in the current one. Note that in the new ABI `__iter_pointer` and `__parent_pointer` are the same type (but not in the old one). The confusion between these two types is unfortunate but it was the best solution I could come up with that maintains the ABI. The typedef changes force a ton of explicit type casts to correct pointer types and to make current code compatible with both the old and new pointer typedefs. This is the bulk of the change and it's really messy. Unfortunately I don't know how to avoid it. Please let me know what you think. Reviewers: howard.hinnant, mclow.lists Subscribers: howard.hinnant, bbannier, cfe-commits Differential Revision: https://reviews.llvm.org/D20786 llvm-svn: 276003
* Remove locale tests that depend on enviroment variables.Eric Fiselier2016-07-181-17/+0
| | | | | | | | | | | | | | Constructing a std::locale object from an empty string selects the language from the current environment variables. If the environment variables name a locale that doesn't exist, or isn't installed, then the construction of facets using that locale may throw. This patch removes tests that use 'std::locale l("")'. The optimal solution would be to manually set the environment variables in the test. Unfortunately there is no portable way to do this. llvm-svn: 275772
* [libcxx][filesystem] Remove setgid from parent before testing permissionsJonas Hahnfeld2016-07-181-0/+3
| | | | | | | | | man page for mkdir says: "If the parent directory has the set-group-ID bit set, then so will the newly created directory." Differential Revision: https://reviews.llvm.org/D22265 llvm-svn: 275760
* Add checkpoint diagnostics to help diagnose buildbot failures.Eric Fiselier2016-07-181-0/+4
| | | | llvm-svn: 275754
* Prevent failures by marking Clock::is_steady tests as UNSUPPORTED: asan.Eric Fiselier2016-07-183-0/+12
| | | | llvm-svn: 275753
* Add includes in test. Patch from STL@microsoft.comEric Fiselier2016-07-181-0/+4
| | | | llvm-svn: 275751
* Suppress warning in make_from_tuple tests.Eric Fiselier2016-07-181-0/+4
| | | | llvm-svn: 275748
* Implement C++17 tuple bits. Including apply and make_from_tuple.Eric Fiselier2016-07-187-0/+1151
| | | | | | | | | | This patch upgrades <tuple> to be C++17 compliant by implementing: * tuple_size_v: This was forgotten when implementing the other _v traits. * std::apply: This was added via LFTS v1 in p0220r1. * std::make_from_tuple: This was added in p0209r2. llvm-svn: 275745
* Fix std::experimental::optional tests. Patch from Casey Carter.Eric Fiselier2016-07-175-13/+9
| | | | llvm-svn: 275732
* Add more tests for LWG#2582. No code changes needed, just tests.Marshall Clow2016-07-1225-19/+47
| | | | llvm-svn: 275211
* libc++: name anonymous structsJF Bastien2016-07-121-9/+9
| | | | | | As discussed in http://reviews.llvm.org/D22073 llvm-svn: 275210
* Add tests for the meta.unary.props that do not require a complete type. This ↵Marshall Clow2016-07-124-0/+14
| | | | | | is part of LWG#2582 llvm-svn: 275184
* Always use the allocator to construct/destruct elements of a deque/vector. ↵Marshall Clow2016-07-112-0/+21
| | | | | | Fixes PR#28412. Thanks to Jonathan Wakely for the report. llvm-svn: 275105
* Allow is_swappable to SFINAE on deleted/ambiguous swap functionsEric Fiselier2016-07-111-0/+21
| | | | llvm-svn: 275094
* Fix typo in #ifdef; leave tests commented out b/c gcc 4.8 harks on them.Marshall Clow2016-07-081-2/+2
| | | | llvm-svn: 274882
* Revert r274605 due to bot failure: ↵Manman Ren2016-07-061-7/+7
| | | | | | http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/244/ llvm-svn: 274651
OpenPOWER on IntegriCloud