summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove more usages of REQUIRES-ANY in the test-suiteEric Fiselier2017-03-023-3/+3
| | | | llvm-svn: 296727
* Fix Apple-specific XFAIL directive in libc++ testMehdi Amini2017-03-012-2/+2
| | | | | | | | | These tests are failing in XCode 8.0, 8.1, and 8.2, but not in Xcode 8.3. Annoyingly the version numbering for clang does not follow Xcode and is bumped to 8.1 only in Xcode 8.3. So Xfailing apple-clang-8.0 should catch all cases here. llvm-svn: 296704
* Fix PR32097 - is_abstract doesn't work on class templates.Eric Fiselier2017-03-011-0/+10
| | | | | | | | | | This patch fixes llvm.org/PR32097 by using the __is_abstract builtin type-trait instead of the previous library-only implementation. All supported compilers provide this trait. I've tested as far back as Clang 3.2, GCC 4.6 and MSVC trunk. llvm-svn: 296561
* Updated the XFAIL comment in variant tests.Michael Park2017-03-012-2/+8
| | | | | | | | | | | | | | Summary: `ConstexprTestTypes::NoCtors` is an aggregate type (and consequently a literal type) in C++17, but not in C++14 since it has a base class. This patch updates the comment to accurately describe the reason for the XFAIL. Reviewers: EricWF Reviewed By: EricWF Differential Revision: https://reviews.llvm.org/D30481 llvm-svn: 296558
* Update all bug URL's to point to https://bugs.llvm.org/...Eric Fiselier2017-02-1712-15/+15
| | | | llvm-svn: 295434
* Add tests for noexcept functionsEric Fiselier2017-02-133-93/+190
| | | | llvm-svn: 294995
* test: squelch -Wreturn-type errorSaleem Abdulrasool2017-02-121-1/+8
| | | | | | | Add an unreachable marker to avoid a -Wreturn-type error when building on Windows. llvm-svn: 294901
* Fix PR31916 - std::visit rejects visitors accepting lvalue argumentsEric Fiselier2017-02-091-0/+11
| | | | | | | | | | A static assertion was misfiring since it checked is_callable<Visitor, decltype(__variant_alt<T>.value)>. However the decltype expression doesn't capture the value category as required. This patch applies extra braces to decltype to fix that. llvm-svn: 294612
* Implement LWG 2773 - std::ignore should be constexpr.Eric Fiselier2017-02-062-0/+77
| | | | | | | | In addition to the PR for LWG 2773 this patch also ensures that each of std::ignores constructors or assignment operators are constexpr. llvm-svn: 294165
* [libcxx] [test] Strip trailing whitespace.Stephan T. Lavavej2017-02-052-2/+2
| | | | | | No functional change, no code review. llvm-svn: 294161
* [libcxx] [test] Fix comment typos.Stephan T. Lavavej2017-02-052-2/+2
| | | | | | No functional change, no code review. llvm-svn: 294160
* [libcxx] [test] Avoid MSVC's non-Standard ABI in underlying_type.pass.cpp.Stephan T. Lavavej2017-02-051-9/+17
| | | | | | | | | | | | When compiled with Clang for Windows, this was emitting "enumerator value evaluates to 4294967295, which cannot be narrowed to type 'int' [-Wc++11-narrowing]". The test should more strenuously avoid poking this ABI deficiency (and it already has coverage for explicitly specified underlying types). Fixes D29140. llvm-svn: 294159
* [libcxx] [test] Fix Clang -Wunused-local-typedef, part 3/3.Stephan T. Lavavej2017-02-052-3/+1
| | | | | | | | | | | | | | | | test/std/strings/string.classes/typedefs.pass.cpp Actually test what basic_string's typedefs stand for. test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp NotDerived and ND were completely unused. test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp P2 was mistakenly not being used. Yes, that's right: -Wunused-local-typedef CAUGHT A MISTAKE! AMAZING! Fixes D29137. llvm-svn: 294156
* [libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.Stephan T. Lavavej2017-02-056-15/+0
| | | | | | | | These typedefs were completely unused. Fixes D29136. llvm-svn: 294155
* Change the base class of std::bad_optional_access. This is a (subtle) ABI ↵Marshall Clow2017-02-051-3/+3
| | | | | | change, and is in response to http://http://wg21.link/LWG2806, which I *expect* to be adopted in Kona. I am making this change now in anticipation, and will get it into 4.0, because (a) 4.0 is the first release with std::optional, and (b) I don't want to make an ABI-change later, when the user base should be significantly larger. Note that I didn't change std::experimental::bad_optional_access, because that's still specified to derive from std::logic_error. llvm-svn: 294133
* Remove auto_ptr in C++17. Get it back by defining ↵Marshall Clow2017-01-243-1/+3
| | | | | | _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR llvm-svn: 292986
* Mark LWG2736 as complete. No code changes, but we have more tests nowMarshall Clow2017-01-242-3/+35
| | | | llvm-svn: 292958
* 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
* 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-2111-0/+287
| | | | | | | | | | | | | | | | | | | | | 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-188-11/+11
| | | | | | No functional change, no code review. llvm-svn: 292434
* [libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants.Stephan T. Lavavej2017-01-1810-12/+30
| | | | | | | | | | | | | | | | | | 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
* [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
* 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
* Mark test as UNSUPPORTED on Windows since it hangs foreverEric Fiselier2017-01-141-0/+3
| | | | llvm-svn: 292012
* [libcxx] [test] Strip trailing whitespace. NFC, no code review.Stephan T. Lavavej2017-01-073-3/+3
| | | | llvm-svn: 291322
* Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANGEric Fiselier2017-01-061-1/+3
| | | | 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
* [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 PR31489 - std::function self-swap segfaultsEric Fiselier2016-12-292-94/+195
| | | | llvm-svn: 290721
* Implement P0435R1 - Resolving LWG issues for common_typeEric Fiselier2016-12-271-10/+183
| | | | llvm-svn: 290627
* Fix PR31481 - 3+ parameter common_type isn't SFINAE friendlyEric Fiselier2016-12-271-5/+17
| | | | llvm-svn: 290624
* fix newly failing c++03 testsEric Fiselier2016-12-241-0/+2
| | | | llvm-svn: 290472
* Fix unused parameters and variablesEric Fiselier2016-12-2311-17/+47
| | | | llvm-svn: 290459
* Add apple-clang-8 to list of XFAILS for some variant tests. Patch from ↵Eric Fiselier2016-12-232-2/+2
| | | | | | Michael Park llvm-svn: 290440
* Fix XFAILS for is_trivially_destructible traitEric Fiselier2016-12-152-6/+0
| | | | llvm-svn: 289802
* Fix typoEric Fiselier2016-12-151-1/+1
| | | | llvm-svn: 289781
* Add tests for LWG 2796Eric Fiselier2016-12-152-0/+73
| | | | llvm-svn: 289780
OpenPOWER on IntegriCloud