summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] [test] Fix comment typos, strip trailing whitespace.Stephan T. Lavavej2017-01-1847-60/+60
| | | | | | 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
* Re-add mechanism to override LIT options using enviroment variables.Eric Fiselier2017-01-181-17/+27
| | | | | | | There was a dumb mistake in the original commit that has now been fixed llvm-svn: 292351
* Revert "Add mechanism to override LIT options using enviroment variables"Eric Fiselier2017-01-181-27/+17
| | | | | | | The buildbots currently depend on the old configuration. I'll recommit once Zorg is fixed and reset llvm-svn: 292347
* Add mechanism to override LIT options using enviroment variablesEric Fiselier2017-01-181-17/+27
| | | | llvm-svn: 292346
* 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
* Get more std::string _LIBCPP_DEBUG tests passingEric Fiselier2017-01-182-5/+8
| | | | llvm-svn: 292342
* More configuration changes for running the test suite against MSVC's STLEric Fiselier2017-01-184-1/+17
| | | | llvm-svn: 292337
* Add support for running our test suite against MSVC's STLEric Fiselier2017-01-183-4/+8
| | | | 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
* Add warning messages to buildit/testit about their upcoming removalEric Fiselier2017-01-171-0/+3
| | | | llvm-svn: 292181
* 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
* Improve CMake and LIT support for WindowsEric Fiselier2017-01-162-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains multiple cleanups and fixes to better support building on Windows. * [Test] Fix handling of library runtime search paths by correctly adding them to the PATH variable when running the tests. * [Test] Don't explicitly force "--target=i686-pc-windows" when running the test suite. Clang++ seems to deduce the correct target. * [Test] Fix `.sh.cpp` tests on Windows by properly escaping flags used in shell commands. Specifically windows style paths which included spaces were causing these tests to fail. * [CMake] Add "vcruntime" to the list of supported C++ ABI libraries in CMake, and teach the test suite how to handle it. For now libc++ defaults to using "vcruntime" on Windows except when libc++abi is in tree; That is probably a bug and should be changed to always use vcruntime, at least for now. * [Misc] Move the "c++-build" include directory to the libc++ binary dir instead of the top level project dir and rename it "c++build". This is just misc cleanup. Libc++ shouldn't be creating internal build files and directories at the top-level projects root. * [Misc] Build type_info's destructor when building for MSVC. This is a temporary work around to prevent link errors until we have a proper type_info implementation. llvm-svn: 292157
* 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
* Work around python3 bytes vs str in libc++ test configEric Fiselier2017-01-151-1/+2
| | | | llvm-svn: 292038
* XFAIL native handle testsEric Fiselier2017-01-144-0/+8
| | | | llvm-svn: 292029
* Fix demangle.h on WindowsEric Fiselier2017-01-141-1/+1
| | | | llvm-svn: 292028
* 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
* Fix Windows try_lock implementationEric Fiselier2017-01-141-0/+3
| | | | llvm-svn: 292011
* [libc++][CMake] Use debug MSVC runtimes when libc++ is built in debug modeEric Fiselier2017-01-144-3/+50
| | | | | | | | | | | | Summary: This patch allows libc++ to be built against the debug MSVC runtimes instead of just the release ones. Reviewers: rnk, majnemer, compnerd, smeenai Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D28725 llvm-svn: 292006
* [libc++] [CMake] Link with /nodefaultlibs on WindowsEric Fiselier2017-01-141-1/+1
| | | | | | | | | | | | | | | | Summary: This patch attempts to fix the libc++ build/link so that it doesn't use an default C++ libraries on Windows. This is needed to prevent linking to MSVC's STL library. Additionally this patch changes libc++ so that it is always linked with the non-debug DLL's (e.g. `/MD`). This is needed so that the test suite can correctly link the same libraries without needing to know which configuration `c++.dll` was linked with. Reviewers: compnerd, rnk, majnemer, kimgr, awson, halyavin, smeenai Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28441 llvm-svn: 292001
* Use __is_identifier to detect Clang extensions instead of __has_extension.Eric Fiselier2017-01-141-0/+10
| | | | | | | | | | | | | | | | | | | | | When -pedantic-errors is specified `__has_extension(<feature>)` is always false when it would otherwise be true. This causes C++03 <atomic> to break along with other issues. This patch avoids the above problem by using __is_identifier(...) instead since it is not affected by -pedantic-errors. For example instead of checking for __has_extension(c_atomics) we now check `!__is_identifier(_Atomic)`, which is only true when _Atomic is not a keyword provided by the compiler. This patch applies similar changes to the detection logic for __decltype and __nullptr as well. Note that it does not apply this change to the C++03 `static_assert` macro since -Wc11-extensions warnings generated by expanding that macro will appear in user code, and will not be suppressed as part of a system header. llvm-svn: 291995
* Don't force use of lld in tests on WindowsEric Fiselier2017-01-141-1/+1
| | | | llvm-svn: 291987
* Diagnose invalid memory orderings in <atomic>Eric Fiselier2017-01-131-0/+124
| | | | llvm-svn: 291976
* Diagnose non-const-callable hash functions and comparatorsEric Fiselier2017-01-132-1/+59
| | | | llvm-svn: 291969
* Add _LIBCPP_DIAGNOSE_WARNING and _LIBCPP_DIAGNOSE_ERROR macros.Eric Fiselier2017-01-135-28/+86
| | | | | | | | | | | | | | | | | | Clang recently added a `diagnose_if(cond, msg, type)` attribute which can be used to generate diagnostics when `cond` is a constant expression that evaluates to true. Otherwise no attribute has no effect. This patch adds _LIBCPP_DIAGNOSE_ERROR/WARNING macros which use this new attribute. Additionally this patch implements a diagnostic message when a non-const-callable comparator is given to a container. Note: For now the warning version of the diagnostic is useless within libc++ since warning diagnostics are suppressed by the system header pragma. I'm going to work on fixing this. llvm-svn: 291961
* 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
* Replace identifiers called `__out` because Windows.h #defines it.Eric Fiselier2017-01-071-0/+7
| | | | | | | | Windows is greedy and it defines the identifier `__out` as a macro. This patch renames all conflicting libc++ identifiers in order to correctly work on Windows. llvm-svn: 291345
* [libcxx] [test] Strip trailing whitespace. NFC, no code review.Stephan T. Lavavej2017-01-075-8/+8
| | | | llvm-svn: 291322
* Get all tuple tests passing on WindowsEric Fiselier2017-01-072-2/+3
| | | | llvm-svn: 291311
* Fix linking of DLL's on WindowsEric Fiselier2017-01-073-23/+63
| | | | | | | | On Windows the runtime search path for DLL's is the same as PATH. This patch changes the test suite to add the libc++ build directory to the runtime PATH. llvm-svn: 291309
* Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANGEric Fiselier2017-01-065-9/+63
| | | | llvm-svn: 291278
* [libc++] Cleanup and document <__threading_support>Eric Fiselier2017-01-063-3/+3
| | | | | | | | | | | | | | | Summary: This patch attempts to clean up the macro configuration mess in `<__threading_support>`, specifically the mess involving external threading variants. Additionally this patch adds design documentation for `<__threading_support>` and the configuration macros it uses. The primary change in this patch is separating the idea of an "external API" provided by `<__external_threading>` and the idea of having an external threading library. Now `_LIBCPP_HAS_THREAD_API_EXTERNAL` means that libc++ should use `<__external_threading>` and that the header is expected to exist. Additionally the new macro `_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL` is now used to configure for using an "external library" with the default threading API. Reviewers: compnerd, rmaprath Subscribers: smeenai, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28316 llvm-svn: 291275
* Add gcc-[56] clang-3.[678] to list of XFAILS for variant tests. Patch from ↵Eric Fiselier2017-01-054-9/+14
| | | | | | Michael Park llvm-svn: 291094
* Use C++11 static_assert in variant tests. Patch from Michael ParkEric Fiselier2017-01-052-24/+24
| | | | llvm-svn: 291093
* Get tests linking on Windows.Eric Fiselier2017-01-051-0/+6
| | | | | | | This patch is a temporary hack to get the tests passing on Windows. llvm-svn: 291091
* Fix test suite configuration when no lit.site.cfg is availableEric Fiselier2017-01-051-3/+5
| | | | llvm-svn: 291081
* Get test-suite configuring on Windows with clang-clEric Fiselier2017-01-051-9/+50
| | | | | | | | | | | | | | | This patch gets the test suite "working" on Windows, although none of the tests pass. In order to reuse the existing configuration, which uses UNIX style flags not accepted by clang-cl, this patch only works with clang++. When clang-cl is specified the test harness secretly looks for clang++ and then it configures it using the INCLUDE and LIB enviroment variables. This is very much a work in progress. llvm-svn: 291072
* 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-052-2/+34
| | | | | | | | 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-053-0/+66
| | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud