summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing include that caused a test failure on Windows. Thanks to STL for ↵Marshall Clow2016-08-221-0/+1
| | | | | | the patch. No functional change. llvm-svn: 279453
* [CMake] Get libcxx building under LLVM/runtimesChris Bieneman2016-08-181-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: The new LLVM runtimes build directory requires some basic conventions across the runtime projects. These changes make libcxx build under the runtimes subdirectory. The general idea of the changes is that the runtimes subdirectory requires some conventions to be consistent across runtime projects. I expect to have a few more small patches that build on this to tie up check targets and other things useful in development workflows. Summary of changes in this patch: * Renamed variable LLVM_CONFIG -> LLVM_CONFIG_PATH * Renamed variable LIBCXX_BUILT_STANDALONE -> LIBCXX_STANDALONE_BUILD * Add an include of AddLLVM in the tests subdirectory for add_lit_testsuite. Reviewers: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23696 llvm-svn: 279151
* make the associative containers do the right thing for ↵Marshall Clow2016-08-171-0/+158
| | | | | | propogate_on_container_assignment. Fixes bug #29001. Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure. llvm-svn: 279008
* Support allocators with explicit conversion constructors. Fixes bug #29000Marshall Clow2016-08-1739-3/+1000
| | | | llvm-svn: 278904
* libcxx: Fix path.compare.pass expected resultAdhemerval Zanella2016-08-151-6/+10
| | | | | | | | | | | | | | | | | | | The expected 'filesystem::path::compare' result states that for different path only result sign contains the information about passed arguments (not its integer value). This is due it uses the output of other compare functions (basic_string_view and char_traits) without further handling and char_traits uses memcmp for final buffer comparison. However for GLIBC on AArch64 the code: int ret = memcmp ("b/a/c", "a/b/c", 1); Results in '64' where for x86_64 it results in '1'. This patch fixes the expected 'filesystem::path::compare' by normalizing all the results before assert comparison. llvm-svn: 278745
* Fix new ASAN failuresEric Fiselier2016-08-152-2/+3
| | | | llvm-svn: 278736
* Use -O1 when testing with ASAN and MSAN to prevent Clang OOM errors.Eric Fiselier2016-08-151-0/+2
| | | | | | | | Currently certain tests get killed when compiled with ASAN at -O0 because they eat all of the systems memory. This doesn't happen at -O1, so enable that to work around the issue. llvm-svn: 278722
* Remove test for the sign of a NaN - doesn't work on MIPS, not strictly ↵Marshall Clow2016-08-111-1/+0
| | | | | | legal. Fixes bug 28936 llvm-svn: 278387
* test: relax the FS test a slight bit to be more reliableSaleem Abdulrasool2016-08-111-1/+2
| | | | | | | | | Some filesystems track atime always. This relaxes the test to accept either a filesystem which does not accurately track atime or does track the atime accurately. This allows the test to pass on filesystems mounted with `strictatime` on Linux or on macOS. llvm-svn: 278357
* Unbreak C++03 build.Eric Fiselier2016-08-111-1/+1
| | | | llvm-svn: 278323
* Refactor test archetypes implementation.Eric Fiselier2016-08-118-167/+209
| | | | llvm-svn: 278319
* Add missing REQUIRES for C++14Eric Fiselier2016-08-112-2/+2
| | | | llvm-svn: 278311
* [libcxx] Add std::anyEric Fiselier2016-08-1141-43/+3178
| | | | | | | | | | | | | | | | | | | Summary: This patch adds std::any by moving/adapting <experimental/any>. This patch also implements the std::any parts of p0032r3 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0032r3.pdf) and LWG 2509 (http://cplusplus.github.io/LWG/lwg-defects.html#2509). I plan to push it in a day or two if there are no comments. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22733 llvm-svn: 278310
* Implement LWG 2148: Make non-enum default hash specialization well-formedEric Fiselier2016-08-102-5/+40
| | | | | | | | | | | | | | | | | Summary: This patch removes the static_assert for non-enum types in the primary hash template. Instead non-enum types create a hash<T> specialization that is not constructible nor callable. See also: * http://cplusplus.github.io/LWG/lwg-active.html#2543 * https://llvm.org/bugs/show_bug.cgi?id=28917 Reviewers: mclow.lists, EricWF Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D23331 llvm-svn: 278300
* std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.Marshall Clow2016-08-101-0/+51
| | | | llvm-svn: 278282
* test/hard_link_count(): Fix test on darwinMatthias Braun2016-08-101-8/+17
| | | | | | | The hard link count that stat reports are different between normal hfs and the case sensitive variant. Accept both. llvm-svn: 278191
* Fix copy/move constructor annotation for the uses-allocator test types.Eric Fiselier2016-08-081-9/+19
| | | | | | | Previously the copy/move constructors of the test types did not properly set the arg_id to T const& or T&& respectivly. llvm-svn: 277970
* [libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctorHubert Tong2016-08-071-0/+39
| | | | | | | | | | | | | | | | | | | | | | Summary: The synopsis in C++11 subclause 28.8 [re.regex] has: ``` basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); ``` The default argument is added to libc++ by this change. Reviewers: mclow.lists, rsmith, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22702 Reapplies r277966. Patch by Jason Liu! llvm-svn: 277968
* Revert r277966. Forgot patch attribution.Hubert Tong2016-08-071-39/+0
| | | | llvm-svn: 277967
* [libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctorHubert Tong2016-08-071-0/+39
| | | | | | | | | | | | | | | | | | | Summary: The synopsis in C++11 subclause 28.8 [re.regex] has: ``` basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); ``` The default argument is added to libc++ by this change. Reviewers: mclow.lists, rsmith, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22702 llvm-svn: 277966
* Fix compile error due to mismatched iterator types. Patch from STL@microsoft.comEric Fiselier2016-08-031-1/+1
| | | | llvm-svn: 277574
* Fix an MSVC x64 compiler warning. Patch from STL@microsoft.comEric Fiselier2016-08-033-9/+12
| | | | llvm-svn: 277573
* Silence another occurrence of MSVC's suprious unused warning. Patch from ↵Eric Fiselier2016-08-031-1/+4
| | | | | | STL@microsoft.com llvm-svn: 277572
* [libcxx] basic_regex: add traits_type, string_typeHubert Tong2016-08-021-0/+6
| | | | | | | | | | | | | | | | | Summary: In the synopsis in C++11 subclause 28.8 [re.regex], `basic_regex` is specified to have member typedefs `traits_type` and `string_type`. This change adds them to libc++. Reviewers: mclow.lists, rsmith, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22698 Patch by Jason Liu! llvm-svn: 277526
* NFC: fix typoJF Bastien2016-08-011-1/+1
| | | | llvm-svn: 277404
* atomics.align: XFAIL GCCJF Bastien2016-08-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | It currently fails because GCC changed the mangling of templates, which affects std::atomic using __attribute__((vector(X))). The bot using GCC 4.9 generates the following message: In file included from /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp:24:0: /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic: In instantiation of 'atomic_test<T>::atomic_test() [with T = __vector(2) int]': /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp:66:3: required from here /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:583:5: error: 'std::__1::__gcc_atomic::__gcc_atomic_t<_Tp>::__gcc_atomic_t() [with _Tp = __vector(2) int]' conflicts with a previous declaration __gcc_atomic_t() _NOEXCEPT = default; ^ /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:583:5: note: previous declaration 'std::__1::__gcc_atomic::__gcc_atomic_t<_Tp>::__gcc_atomic_t() [with _Tp = __vector(1) int]' /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:583:5: note: -fabi-version=6 (or =0) avoids this error with a change in mangling /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:583:5: error: 'std::__1::__gcc_atomic::__gcc_atomic_t<_Tp>::__gcc_atomic_t() [with _Tp = __vector(2) int]' conflicts with a previous declaration /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:583:5: note: previous declaration 'std::__1::__gcc_atomic::__gcc_atomic_t<_Tp>::__gcc_atomic_t() [with _Tp = __vector(1) int]' /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:583:5: note: -fabi-version=6 (or =0) avoids this error with a change in mangling /home/llvm-builder/llvm-buildslave-root/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11/llvm/projects/libcxx/include/atomic:939:5: note: synthesized method 'std::__1::__gcc_atomic::__gcc_atomic_t<_Tp>::__gcc_atomic_t() [with _Tp = __vector(2) int]' first required here __atomic_base() _NOEXCEPT = default; ^ GCC's docs say the following about ABI version 6: Version 6, which first appeared in G++ 4.7, corrects the promotion behavior of C++11 scoped enums and the mangling of template argument packs, const/static_cast, prefix ++ and –, and a class scope function used as a template argument. llvm-svn: 277380
* libc++: test lock-free atomic alignmentJF Bastien2016-08-011-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: libc++ implements std::atomic<_Tp> using __atomic_base<_Tp> with `mutable _Atomic(_Tp) __a_`. That member must be suitably aligned on relevant ISAs for instructions such as cmpxchg to work properly, but this alignment isn't checked anywhere. __atomic_base's implementation relies on _Atomic doing "the right thing" since it's under the compiler's control, and only the compiler knows about lock-freedom and instruction generation. This test makes sure that the compiler isn't breaking libc++'s expectations. I'm looking at a few odd things in the C++ standard, and will have a few other fixes around this area in the future. This requires building with `-DLIBCXX_HAS_ATOMIC_LIB=True`, the test marks the dependency as REQUIRES and won't be run without. Reviewers: cfe-commits Subscribers: EricWF, mclow.lists Differential Revision: http://reviews.llvm.org/D22073 llvm-svn: 277368
* Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.Marshall Clow2016-07-266-0/+359
| | | | llvm-svn: 276751
* Implement LCM and GCD for Library Fundamentals. Reviewed as ↵Marshall Clow2016-07-268-0/+389
| | | | | | https://reviews.llvm.org/D21343. llvm-svn: 276750
* Remove use of C++1z static assert in C++11 testEric Fiselier2016-07-251-8/+8
| | | | llvm-svn: 276608
* Implement the std::pair parts of "Improving pair and tuple". Completes N4387.Eric Fiselier2016-07-2510-35/+778
| | | | llvm-svn: 276605
* Recommit r276548 - Make pair/tuples assignment operators SFINAE properly.Eric Fiselier2016-07-255-2/+334
| | | | | | | I think I've solved issues with is_assignable and references to incomplete types. The updated patch adds tests for this case. llvm-svn: 276603
* Make std::is_assignable tolerate references to incomplete types.Eric Fiselier2016-07-251-2/+5
| | | | llvm-svn: 276599
* 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
* commit test missing from r276556Eric Fiselier2016-07-241-0/+27
| | | | llvm-svn: 276558
OpenPOWER on IntegriCloud