Marshall Clow
b414b2f54b
Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262
...
llvm-svn: 258107
2016-01-19 00:50:37 +00:00
Marshall Clow
76b4afc040
Fix PR#25973 : 'basic_string::assign(InputIt, InputIt) doesn't provide the strong exception safety guarantee'. This turned out to be a pervasive problem in <string>, which required a fair amount of rework. Add in an optimization for when iterators provide noexcept increment/comparison/assignment/dereference (which covers many of the iterators in libc++). Reviewed as http://reviews.llvm.org/D15862
...
llvm-svn: 257682
2016-01-13 21:54:34 +00:00
Dan Gohman
4a9e173e08
[WebAssembly] Set std::numeric_limits's traps field for WebAssembly.
...
WebAssembly's integer division instruction traps on division by zero; set the
traps field of integral std::numeric_limits to true.
llvm-svn: 257612
2016-01-13 16:32:00 +00:00
Marshall Clow
df5ddf2c7a
One more missing std:: qualification from Jonathan
...
llvm-svn: 257506
2016-01-12 19:15:10 +00:00
Marshall Clow
8d113d430f
Add a bunch of missing includes in the test suite to make it more portable. Fixes bugs #26120 and #26121 . Thanks to Jonathan Wakely for the reports and the patches.
...
llvm-svn: 257474
2016-01-12 14:51:04 +00:00
Ahmed Bougacha
812d65a26a
[libcxx] Set LC_ALL rather than LC_COLLATE to override collation.
...
r251131 replaced LANG with LC_COLLATE. But LC_ALL has precedence
over both, so the test still fails when LC_ALL=C.
llvm-svn: 257018
2016-01-07 02:36:09 +00:00
Marshall Clow
652a2ce191
Add explicit include directives; the file was getting implicitly included already. NFC
...
llvm-svn: 256864
2016-01-05 19:53:31 +00:00
Marshall Clow
afc9ff99ec
First half of LWG#2354: 'Unnecessary copying when inserting into maps with braced-init syntax'
...
llvm-svn: 256859
2016-01-05 19:32:41 +00:00
Eric Fiselier
7a608aa232
[libcxx] Fix LWG Issue #2367 - Fixing std::tuple and std::pair's default constructors.
...
Summary: This patch implements the solution for LWG Issue #2367 . See http://cplusplus.github.io/LWG/lwg-active.html#2367
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13750
llvm-svn: 256325
2015-12-23 08:20:26 +00:00
Eric Fiselier
51b9de4c7c
Fix type in tuple test. Sorry for the noise
...
llvm-svn: 255944
2015-12-18 01:04:36 +00:00
Eric Fiselier
545b8861fc
[libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
...
Review: http://reviews.llvm.org/D14839
llvm-svn: 255941
2015-12-18 00:36:55 +00:00
Eric Fiselier
831c112954
Fix various GCC mis-configurations for newer versions.
...
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:
1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.
llvm-svn: 255585
2015-12-15 00:32:21 +00:00
Marshall Clow
6e07ccdfe1
K-Ballo pointed out a mistake in the add_lvalue_ref tests I checked in; now more of them are passing. Thanks
...
llvm-svn: 255519
2015-12-14 18:11:51 +00:00
Marshall Clow
94b5bc4263
Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
...
llvm-svn: 255517
2015-12-14 18:01:56 +00:00
Marshall Clow
161eae2daa
Add add_lvalue_ref tests for a few function types, with a note why not more
...
llvm-svn: 255513
2015-12-14 17:34:03 +00:00
Eric Fiselier
fff5ec035b
Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.
...
llvm-svn: 255162
2015-12-09 22:03:06 +00:00
Marshall Clow
b8427293df
Last bit of P0006; mark it as complete
...
llvm-svn: 254290
2015-11-30 05:39:30 +00:00
Marshall Clow
12dff9e66a
Fix bugs in alignment_of_v, etc. Re-enable the newly added tests
...
llvm-svn: 254289
2015-11-30 05:20:00 +00:00
Marshall Clow
00b6b01592
Temporarily disable new tests while I figure out what's going on
...
llvm-svn: 254288
2015-11-30 05:15:10 +00:00
Marshall Clow
c8f3816e63
Fix bad macros
...
llvm-svn: 254287
2015-11-30 05:10:10 +00:00
Marshall Clow
4ddfaea773
Implement more of P0006; Type Traits Variable Templates. <ratio>
...
llvm-svn: 254285
2015-11-30 05:04:22 +00:00
Marshall Clow
803a8bb105
Fix bad macros in tests
...
llvm-svn: 254284
2015-11-30 05:03:35 +00:00
Marshall Clow
e12a536d76
Implement more of P0006; Type Traits Variable Templates.
...
llvm-svn: 254283
2015-11-30 04:30:02 +00:00
Marshall Clow
94f89aeec5
Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this.
...
llvm-svn: 254119
2015-11-26 01:24:04 +00:00
Marshall Clow
9d73243bc1
Silence a -Wmissing-braces warning in the tests; mbstate_t is defined differently on different C libraries.
...
llvm-svn: 254050
2015-11-25 01:06:36 +00:00
Marshall Clow
e0312a3047
Remove undefined behavior from tests; specifically, ensure that the value type of the allocators match the value type of the containers
...
llvm-svn: 254030
2015-11-24 22:10:51 +00:00
Marshall Clow
1867554cc6
Add tests for the extended integer types - as required by LWG#2119
...
llvm-svn: 253376
2015-11-17 21:04:24 +00:00
Marshall Clow
dbd2d32892
Implement P0007: Constant View: A proposal for a std::as_const helper function template.
...
llvm-svn: 253274
2015-11-17 00:08:08 +00:00
Marshall Clow
28ec78e7a5
Fix compile error in test. Can't use `operator[]` for multimap.
...
llvm-svn: 253271
2015-11-16 23:40:27 +00:00
Marshall Clow
b90e350017
More tests for LWG#2156
...
llvm-svn: 253257
2015-11-16 22:18:36 +00:00
Marshall Clow
a9197737f9
LWG#2156 loosened the requirements on unordered containers 'rehash' calls. Add tests to make sure we meet these requirements. Since we met the stricter ones, no code change needed to meet the looser ones.
...
llvm-svn: 253223
2015-11-16 16:42:16 +00:00
Marshall Clow
dd1b261f3a
Implement P0013R1: Logical Operator Type Traits. Make a hidden implementation (__and_, __or_, and __not_) so that we can use them elsewhere in non-C++17 code - for example, in the LFTS
...
llvm-svn: 253215
2015-11-16 15:54:13 +00:00
Marshall Clow
183c010c9a
Implement P0074: Making owner_less more flexible
...
llvm-svn: 252905
2015-11-12 15:56:44 +00:00
Asiri Rathnayake
ea4282d336
[libcxx] Fixup a few fumbles in the initial no-exceptions XFAILs list.
...
The initial buildbot run found a few missing bits in the initial XFAIL list
for the no-exceptions libc++ variant. These discrepancies are as follows:
[1] Following two tests need XFAILs on the no-exceptions library variant.
My local runs had these two disabled for other reasons (unsupported):
- localization/locales/locale/locale.cons/char_pointer.pass.cpp
- numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp
[2] These three does not need XFAILs, they were failing on my local runs for
other reasons:
- depr/depr.c.headers/uchar_h.pass.cpp
- input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
- .../category.collate/locale.collate.byname/transform.pass.cpp
(these are failing on my box for the default build as well)
The current patch fixes both the cases above. Additionally, I've run the
following scan to make sure I've covered all the cases:
> grep ' catch \| try \| throw ' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \
uniq > 1.txt
> grep 'libcpp-no-exceptions' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \
uniq > 2.txt
> diff 1.txt 2.txt
This showed up a few extra interesting cases:
[3] These two tests do not use try/catch/throw statements, but they fail at
runtime. Need to be investigated, I've left the XFAILs in.
- std/thread/futures/futures.shared_future/dtor.pass.cpp
- std/thread/futures/futures.unique_future/dtor.pass.cpp
[4] These tests use a macro named TEST_HAS_NO_EXCEPTIONS to conditionally
exclude try/catch/throw statements when running without exceptions. I'm not
entirely sure why this was needed (AFAIK, we didn't have a no-exceptions
library build before). The macro's defintion is quite similar to that of
_LIBCPP_NO_EXCEPTIONS. I will investigate if this can be reused for my test
fixes or if it should be replaced with _LIBCPP_NO_EXCEPTIONS.
- std/experimental/any/*
Change-Id: I9ad1e0edd78f305406eaa0ab148b1ab693f7e26a
llvm-svn: 252870
2015-11-12 10:41:57 +00:00
Marshall Clow
d1180f4abc
Fix typo I just introduced.
...
llvm-svn: 252614
2015-11-10 16:10:17 +00:00
Marshall Clow
41277d179f
std:: qualify ptrdiff_t in the test. Thanks to Walter for the catch
...
llvm-svn: 252613
2015-11-10 16:04:13 +00:00
Marshall Clow
d17405fe9c
Walter pointed out some missing includes in the tests. Fixing the includes uncovered a couple bugs in the _v type traits. Fixed those, too
...
llvm-svn: 252612
2015-11-10 15:48:23 +00:00
Marshall Clow
bfba968360
Explicitly #include <utility> so that we get std::move. Thanks to Walter for the bug report.
...
llvm-svn: 252610
2015-11-10 15:22:08 +00:00
Asiri Rathnayake
f520c1445f
Make it possible to build a no-exceptions variant of libcxx.
...
Fixes a small omission in libcxx that prevents libcxx being built when
-DLIBCXX_ENABLE_EXCEPTIONS=0 is specified.
This patch adds XFAILS to all those tests that are currently failing
on the new -fno-exceptions library variant. Follow-up patches will
update the tests (progressively) to cope with the new library variant.
Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a
llvm-svn: 252598
2015-11-10 11:41:22 +00:00
Marshall Clow
e5f1288fa0
Implement LWG#2353: std::next is over-constrained
...
llvm-svn: 252407
2015-11-07 17:48:49 +00:00
Marshall Clow
8be59af1ed
More of P0006R0: type traits variable aliases for C++17.
...
llvm-svn: 252406
2015-11-07 17:44:36 +00:00
Marshall Clow
2cd0d6d625
Implement P0092R1 for C++1z
...
llvm-svn: 252195
2015-11-05 19:33:59 +00:00
Marshall Clow
79dfd99d30
Remove undefined behavior from some tests. Same pattern as the unitialized_copy tests
...
llvm-svn: 251804
2015-11-02 15:29:13 +00:00
Marshall Clow
8eb1d544f8
Remove undefined behavior from some tests. Thanks to Walter Brown for the heads-up.
...
llvm-svn: 251802
2015-11-02 15:25:53 +00:00
Marshall Clow
00ec0bf828
Improve the tests for 'is_literal_type'
...
llvm-svn: 251767
2015-11-01 21:13:10 +00:00
Marshall Clow
dd0ef09954
Implement the first part of P0006R0: Adopt Type Traits Variable Templates for C++17. Significantly augment the existing tests.
...
llvm-svn: 251766
2015-11-01 20:24:59 +00:00
Marshall Clow
131733bcf0
Implement P0004R1 'Remove Deprecated iostreams aliases'
...
llvm-svn: 251618
2015-10-29 05:43:30 +00:00
Marshall Clow
3b72a6ef63
Fix LWG#2489: mem_fn() should be noexcept
...
llvm-svn: 251257
2015-10-25 20:12:16 +00:00
Marshall Clow
531c41e1b8
Add the tests for the last commit
...
llvm-svn: 251254
2015-10-25 19:53:29 +00:00
Marshall Clow
b631c24359
Add a test for LWG#2466: allocator_traits::max_size() default behavior is incorrect
...
llvm-svn: 251252
2015-10-25 19:34:04 +00:00