Howard Hinnant
ff29d538ea
Apply LWG 2048. It is amazing to me that this actually works, but the existing tests confirm that it does. c++1y status page now showing libc++ is complete for c++1y modulo dynarray issues.
...
llvm-svn: 191142
2013-09-21 19:25:37 +00:00
Howard Hinnant
f13cf89df2
Apply LWG 2021. This is only a documentation change. Also bringing c++1y status page up to date.
...
llvm-svn: 191141
2013-09-21 18:17:23 +00:00
Howard Hinnant
b76e6a95a9
Apply LWG 2017. This is a only a documentation change.
...
llvm-svn: 191140
2013-09-21 17:58:58 +00:00
Howard Hinnant
ead6f1699d
N3659: Shared locking in C++ Revision 2, c++1y only
...
llvm-svn: 191127
2013-09-21 01:49:28 +00:00
Howard Hinnant
b1c82cd090
David Chisnall: macro protect 'test' in __has_pointer_type_imp.
...
llvm-svn: 191126
2013-09-21 01:45:05 +00:00
Joerg Sonnenberger
8092c957d2
Fix typo.
...
llvm-svn: 190857
2013-09-17 08:46:53 +00:00
Howard Hinnant
5f878d4bd2
G M: Restore the ability for libcxx to compile again on mingw 64.
...
llvm-svn: 190837
2013-09-17 01:34:47 +00:00
Howard Hinnant
3b2d7ee18c
Marshall Clow: LWG Issue 2056: future_errc enums start with value 0 (invalid value for broken_promise).
...
llvm-svn: 190756
2013-09-14 18:20:10 +00:00
Marshall Clow
a369cb6280
LWG Issue 2210 (Part #7 ): vector and vector<bool>
...
llvm-svn: 190736
2013-09-14 00:47:59 +00:00
Howard Hinnant
84f996fb2e
G M: Make shared_ptr a little more gentle for some compilers. No impact on clang.
...
llvm-svn: 190732
2013-09-13 23:56:00 +00:00
Howard Hinnant
f35fc7ad74
G M: Make valarray a little more forgiving to compilers not quite so gifted. This has no impact on clang.
...
llvm-svn: 190731
2013-09-13 23:27:42 +00:00
Marshall Clow
9a08837ba3
Fix link to dynarray issue
...
llvm-svn: 190707
2013-09-13 17:32:32 +00:00
Marshall Clow
63d233b6ce
Update status for <dynarray>
...
llvm-svn: 190700
2013-09-13 15:37:11 +00:00
Marshall Clow
ef6f1151b0
Initial implementation of <dynarray>. No allocator support pending resolution of LWG #2235 ; no stack allocation pending compiler support
...
llvm-svn: 190697
2013-09-13 15:22:55 +00:00
Marshall Clow
b387ea89a6
Test for 'bad_array_length'; got left out of initial commit
...
llvm-svn: 190614
2013-09-12 17:01:38 +00:00
Marshall Clow
3cd37e6456
LWG Issue 2210 (Part #6 ): unordered_map and unordered_multimap
...
llvm-svn: 190576
2013-09-12 03:00:31 +00:00
Marshall Clow
50c003b577
Implement uses-allocator construction
...
llvm-svn: 190571
2013-09-12 02:11:16 +00:00
Howard Hinnant
872ac4b5f0
A collection of minor type-o fixes. The first two aren't testable, but all tests pass with them. I stumbled across them while experimenting with a std::move that checks its argument for non-const. The third corrects a test that is currently failing.
...
llvm-svn: 190563
2013-09-12 00:10:44 +00:00
Marshall Clow
6e8ebb2ce9
Adding bad_array_length to libc++
...
llvm-svn: 190478
2013-09-11 01:38:42 +00:00
Marshall Clow
fbc317d480
LWG Issue #2210 Part 5 - map/multimap; no, really - the last one was set/multiset. THIS is map/multimap
...
llvm-svn: 190474
2013-09-11 01:15:47 +00:00
Marshall Clow
0a55d17bcd
LWG Issue #2210 Part 4 - map/multimap
...
llvm-svn: 190454
2013-09-11 00:06:45 +00:00
Marshall Clow
f1b6d1b538
Update synopsis for list/forward_list/deque to match the allocator style of existing comment. No code change
...
llvm-svn: 190320
2013-09-09 18:19:45 +00:00
Marshall Clow
cdd01917ff
Remove a tab that snuck in
...
llvm-svn: 190283
2013-09-08 21:13:57 +00:00
Howard Hinnant
224ccb38d3
Fix minor type-o in tests.
...
llvm-svn: 190280
2013-09-08 19:28:51 +00:00
Marshall Clow
fb8297668f
LWG Issue 2210 (Part #2 & #3 ): list and forward_list
...
llvm-svn: 190279
2013-09-08 19:11:51 +00:00
Marshall Clow
630c5e535c
LWG Issue 2210 (Part #1 ): deque
...
llvm-svn: 190251
2013-09-07 16:16:19 +00:00
Marshall Clow
ef44edfde4
N3545: Quoted strings
...
llvm-svn: 190032
2013-09-05 04:48:45 +00:00
Marshall Clow
edc4ee3d15
Mark issues 2103, 2005, 2196 and 2203 as complete. No code changes.
...
llvm-svn: 190012
2013-09-04 23:48:25 +00:00
Howard Hinnant
6272680119
Evgeniy Stepanov: Add noexcept to ~bad_optional_access() to silence warning during build.
...
llvm-svn: 189949
2013-09-04 15:21:08 +00:00
Marshall Clow
8bd0ac1135
Updated status for LSG issues 2122, 2169, 2177, 2140 and 2086.
...
llvm-svn: 189900
2013-09-04 01:06:59 +00:00
Marshall Clow
3e2319e47a
Update status of issues 2045, 2050, 2080, 2081, 2083, 2130, 2137 and 2177.
...
llvm-svn: 189894
2013-09-04 00:18:19 +00:00
Marshall Clow
5155a569d1
LWG Issue 2148: Hashing Enums
...
llvm-svn: 189831
2013-09-03 17:55:32 +00:00
Marshall Clow
710a902cac
Updated the synopsis for weak_ptr<T>::owner_before to match the code. No code changes.
...
llvm-svn: 189812
2013-09-03 14:37:50 +00:00
Marshall Clow
3e6a3d0c29
Fix a typo in the status for <optional>
...
llvm-svn: 189809
2013-09-03 14:16:49 +00:00
Marshall Clow
cb2e838ed0
Eradicate tabs
...
llvm-svn: 189808
2013-09-03 14:14:27 +00:00
Howard Hinnant
e7d746d8b9
Implement N3672, optional<T>.
...
llvm-svn: 189772
2013-09-02 20:30:37 +00:00
Michael Gottesman
b422ecc7de
[cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested.
...
llvm-svn: 189739
2013-09-02 07:28:05 +00:00
Michael Gottesman
05c4b550c9
[cmake] Make libcxx standalone compile on Mac OS X.
...
llvm-svn: 189738
2013-09-02 07:28:03 +00:00
Howard Hinnant
dda6f242fb
Forgot to svn add the test for r189722.
...
llvm-svn: 189723
2013-08-31 17:03:02 +00:00
Howard Hinnant
69bc206547
SFINAE out duration converting constructor if the constructor would otherwise cause a ratio compile-time overflow. This fixes LWG 2094.
...
llvm-svn: 189722
2013-08-31 16:51:56 +00:00
Daniel Dunbar
b6b3e50bf3
[tests] Change with_system_lib feature to match what XFAIL lines expect.
...
- The lit builtin XFAIL handling is more restrictive than what we were
previously using, and for now I'd rather keep the lit one restrictive.
llvm-svn: 189692
2013-08-30 19:52:12 +00:00
Howard Hinnant
525dc284b4
is_destructible for function types was mistakenly returning true instead of false. This is true in both C++11 and C++1y, but has been clarified by the post C++11 LWG issue 2049.
...
llvm-svn: 189687
2013-08-30 19:12:42 +00:00
Howard Hinnant
d0a4d73623
Xing Xue: Fix type-o. Thanks to C. Bergström for spotting it.
...
llvm-svn: 189674
2013-08-30 14:42:39 +00:00
Marshall Clow
1e548c72e7
LWG Issue 2128: Implement global cbegin/rbegin/cend/rbegin
...
llvm-svn: 189634
2013-08-30 01:17:07 +00:00
Howard Hinnant
b81766ca23
Glen: Remove unneeded _LIBCPP_ALWAYS_INLINE.
...
llvm-svn: 189626
2013-08-29 23:50:48 +00:00
Howard Hinnant
9762413621
Xing Xue: Some minor changes for IBM XLC++/AIX.
...
llvm-svn: 189623
2013-08-29 23:37:50 +00:00
Howard Hinnant
393068bb04
Turn off extern templates for most uses. It is causing more problems than it is worth. The extern templates will still be built into the dylib, mainly for ABI stability purposes. And the client can still turn these back on with a #define if desire. This fixes http://llvm.org/bugs/show_bug.cgi?id=17027 . However there's no associated test for the test suite because http://llvm.org/bugs/show_bug.cgi?id=17027 needs mismatched dylib and headers to fire.
...
llvm-svn: 189610
2013-08-29 20:56:53 +00:00
Marshall Clow
eabb87c438
Typo: I wrote "2058" into the status column for issue 2058 instead of "Complete"
...
llvm-svn: 189602
2013-08-29 19:03:01 +00:00
Marshall Clow
08bdca2fc2
Mark LWG issues 2109, 222, 2058, 2091 and 2092 as complete. No changes to libc++ code.
...
llvm-svn: 189601
2013-08-29 18:55:55 +00:00
Marshall Clow
24cca08054
Mark issues 2147, 2149, 2163, 2172, 2098 and 2177 as complete. No code changes to libc++
...
llvm-svn: 189586
2013-08-29 15:35:54 +00:00
Marshall Clow
90a4dad9da
Marked #2163 as complete in previous commit instead of #2162 . Corrected.
...
llvm-svn: 189401
2013-08-27 20:25:06 +00:00
Marshall Clow
06fbed03fc
LWG Issue 2162: mark allocator_traits::maxsize as noexcept
...
llvm-svn: 189399
2013-08-27 20:22:15 +00:00
Marshall Clow
7988106b21
LWG issues 2174/5/6 - mark wstring_convert::converted as noexcept, and make (some of) the constructors for wstring_convert and wbuffer_convert as explicit. Add configuration macro _LIBCPP_EXPLICIT_AFTER_CXX11
...
llvm-svn: 189398
2013-08-27 20:18:59 +00:00
Marshall Clow
bf9ad4a1f8
Mark LWG issues 2190, 2200, and 2211 as done. No changes needed to libc++.
...
llvm-svn: 189359
2013-08-27 15:47:05 +00:00
Marshall Clow
5320c2b563
Update synopsis in <locale> to match LWG Issue 2229. No code change
...
llvm-svn: 189352
2013-08-27 14:22:13 +00:00
Marshall Clow
54c83368a5
Implement LWG issue 2061
...
llvm-svn: 189345
2013-08-27 13:03:03 +00:00
Howard Hinnant
0ed0d69c9c
G M: Improvements to Windows support.
...
llvm-svn: 189273
2013-08-26 20:18:01 +00:00
Howard Hinnant
93288117a5
Apply constexpr to initializer_list for c++1y.
...
llvm-svn: 189271
2013-08-26 20:11:32 +00:00
Marshall Clow
541be9c72c
Mark LWG issues 2011, 2015, 2033, 2065, 2071, 2102, 2235 as complete b/c libc++ already fixed them.
...
llvm-svn: 189232
2013-08-26 17:31:31 +00:00
Howard Hinnant
c9d3ae43d2
G M: Improve support for compilers not supporting defaulted functions.
...
llvm-svn: 189184
2013-08-24 21:31:37 +00:00
Howard Hinnant
145afa17ca
Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.
...
llvm-svn: 189140
2013-08-23 20:10:18 +00:00
Howard Hinnant
2f57df2aa9
Remove _LIBCPP_DEBUG. This was my first attempt at debug mode for libc++, and is now obsoleted by _LIBCPP_DEBUG2 (which isn't finished).
...
llvm-svn: 189135
2013-08-23 19:03:36 +00:00
Howard Hinnant
fc88dbd298
Debug mode for string. This commit also marks the first time libc++ debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib.
...
llvm-svn: 189114
2013-08-23 17:37:05 +00:00
Howard Hinnant
104024cb59
Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.
...
llvm-svn: 189046
2013-08-22 19:39:03 +00:00
Marshall Clow
7b5566c5f5
Mark LWG issues #2083 , 2099 and 2105 as complete. No functionality change.
...
llvm-svn: 189044
2013-08-22 18:53:17 +00:00
Howard Hinnant
427ae44637
XFAIL a few tests on darwin12
...
llvm-svn: 189043
2013-08-22 18:47:39 +00:00
Howard Hinnant
179b1f8cf2
Zhihao Yuan noted that there were a few unneeded statements. Eliminated the unnecessary ones, and commented the ones that are there for non-obvious reasons such as to help things limp along in C++03 language mode.
...
llvm-svn: 189039
2013-08-22 18:29:50 +00:00
Howard Hinnant
9ff3203fcc
Zhihao Yuan noted that a move assignment operation was missing from std::adjacent_difference. Fixed.
...
llvm-svn: 189036
2013-08-22 18:02:34 +00:00
Howard Hinnant
d8bf850359
David Blaikie suggested this test for detecting constexpr on the error_category default constructor. Additionally I decided to make this constructor trivial as well, as I could not come up with a rationale for not doing so. Fully tested with both current Apple clang and tip-of-trunk clang.
...
llvm-svn: 189034
2013-08-22 17:41:48 +00:00
Howard Hinnant
56c917c57f
XFAIL 3 tests on darwin 11-12. The tests have recently been modified, are correct, and pass with an updated libc++.dylib
...
llvm-svn: 188964
2013-08-22 00:04:22 +00:00
Daniel Dunbar
019c5905df
[tests] Update to use lit's now-integrated XFAIL handling.
...
llvm-svn: 188960
2013-08-21 23:06:32 +00:00
Marshall Clow
a86d516213
LWG 2145 - mark constructor for std::error_category as inline and constexpr. Leave the (existing, out-of-line, non-constexpr) in the dylib for compatibility with existing programs)
...
llvm-svn: 188858
2013-08-21 02:57:19 +00:00
Marshall Clow
890d1ee469
Updated status of issues #2093 , 2144, and 2185
...
llvm-svn: 188813
2013-08-20 16:59:06 +00:00
Marshall Clow
8a79e1d053
Updated status and description of issues 2064, 2069 and 2096.
...
llvm-svn: 188811
2013-08-20 16:24:55 +00:00
Marshall Clow
a0393ce271
Updated status of issues #2028 , 2047, and 2053.
...
llvm-svn: 188810
2013-08-20 16:18:29 +00:00
Marshall Clow
e06e3ac7d5
Updated status of issues #1214 , 2207 and 2209. They were already implemented, so no functionality change was needed.
...
llvm-svn: 188803
2013-08-20 14:21:16 +00:00
Howard Hinnant
9309322454
G M: minor fix to silence warning in cmake version 2.8.11.20130809-gba97e.
...
llvm-svn: 188712
2013-08-19 21:42:07 +00:00
Howard Hinnant
113f13d2a5
Relax complete-type check for functions and function pointers to allow void return type. This bug was exposed by Eli Friedman's commit to clang r188324. Anywhere this version of clang ships, this libc++ fix must follow. However this fix is compatible with previous clangs, and so this libc++ doesn't need to wait for this clang.
...
llvm-svn: 188413
2013-08-14 21:28:31 +00:00
Howard Hinnant
5d1a701d6d
Xing Xue: port to IBM XLC++/AIX.
...
llvm-svn: 188396
2013-08-14 18:00:20 +00:00
Marshall Clow
a8c7c154bb
Fix signed/unsigned warnings when building libc++ in C++14 mode
...
llvm-svn: 188395
2013-08-14 17:53:31 +00:00
Howard Hinnant
009aff5e96
Added some missing issues to the c++1y status page, and put in hyperlinks for the papers.
...
llvm-svn: 188387
2013-08-14 17:26:18 +00:00
Marshall Clow
a6821921a7
remove CWG papers from list; add link to clang status page
...
llvm-svn: 188383
2013-08-14 16:30:37 +00:00
Marshall Clow
03bcdf27c6
Added CWG and SG1 papers to libc++ status page
...
llvm-svn: 188381
2013-08-14 16:12:34 +00:00
Marshall Clow
444d3300f2
Mark LWG Issue #2110 and #2113 as completed - they were already done
...
llvm-svn: 188378
2013-08-14 15:28:40 +00:00
Marshall Clow
ede1aa2d31
Add a deleted assignment operator for basic_ostream; LWG Issue #2067
...
llvm-svn: 188375
2013-08-14 15:15:28 +00:00
Marshall Clow
2d6e2834a8
Implement LWG Issue #2187 (emplace_back and emplace for vector<bool>)
...
llvm-svn: 188333
2013-08-13 23:54:12 +00:00
Marshall Clow
e4fa0dee48
Eradicate tabs
...
llvm-svn: 188322
2013-08-13 22:22:40 +00:00
Marshall Clow
e06dfe2ccd
Update for N3657 and issue 2010
...
llvm-svn: 188321
2013-08-13 22:20:01 +00:00
Marshall Clow
2585835c3b
Second half (map/multimap) of N3657
...
llvm-svn: 188320
2013-08-13 22:18:47 +00:00
Marshall Clow
72f7821cc6
Updated issues 2039, 2044, 2197, 2225, and 2231
...
llvm-svn: 188294
2013-08-13 17:02:42 +00:00
Marshall Clow
bd9d059e6c
Updated Issue 2187
...
llvm-svn: 188286
2013-08-13 16:23:22 +00:00
Marshall Clow
e714b879df
Removed 'Ready' issues from Bristol
...
llvm-svn: 188284
2013-08-13 16:07:51 +00:00
Marshall Clow
fb9945594f
Updated issues 2009 and 2074
...
llvm-svn: 188283
2013-08-13 16:01:28 +00:00
Marshall Clow
914993df0b
Added more tests for numeric conversion error handing; Refs LWG issue 2009
...
llvm-svn: 188282
2013-08-13 15:52:51 +00:00
Marshall Clow
47e432c6df
Fix template formatting. No, really
...
llvm-svn: 188277
2013-08-13 15:13:42 +00:00
Marshall Clow
6efb2bf585
escape some template specs
...
llvm-svn: 188276
2013-08-13 15:07:02 +00:00
Marshall Clow
873e890f44
Fix case mismatch
...
llvm-svn: 188275
2013-08-13 14:59:44 +00:00
Marshall Clow
f77718ad1d
Create a C++14 status page
...
llvm-svn: 188273
2013-08-13 14:58:39 +00:00
Marshall Clow
75f9aa9993
More support for N3657; tests for is_transparent
...
llvm-svn: 188242
2013-08-13 01:12:41 +00:00
Marshall Clow
25d3402c6a
First half of support for N3657; heterogenous lookups for set/multiset
...
llvm-svn: 188241
2013-08-13 01:11:06 +00:00
Howard Hinnant
f0544c2086
Nico Rieck: this patch series fixes visibility issues on Windows as explained in < http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html >.
...
llvm-svn: 188192
2013-08-12 18:38:34 +00:00
Howard Hinnant
6afbc442d6
Add a check for arrays of unknown bounds to is_destructible. This fixes http://llvm.org/bugs/show_bug.cgi?id=16839
...
llvm-svn: 188080
2013-08-09 16:53:45 +00:00
Howard Hinnant
d7cda0680a
Partial implementation of N3665. This paper was not voted into the C++1y draft. However I was looking at it and with some experimentation realized that I could partially implement it, and at the same time offer a performance optimization to cout. I simply added an xsputn override to the cout filebuf. The override does nothing special at all if there is a non-trivial codecvt installed. However if the codecvt returns true for always_noconv(), then this function can dump an entire string to fwrite, instead of doing it a character at a time under overflow(). This just makes sense. I stopped short of a full implementation of N3665 because in order to do so, xsputn would have to allocate a buffer when always_noconv() returned false, and I don't want to go to that expense.
...
llvm-svn: 188077
2013-08-09 16:25:43 +00:00
Daniel Dunbar
4a38129468
[tests] Update to use lit_config and lit package, as appropriate.
...
llvm-svn: 188073
2013-08-09 14:44:11 +00:00
Marshall Clow
2472b928d2
N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests
...
llvm-svn: 188019
2013-08-08 21:52:50 +00:00
Howard Hinnant
8c9742051d
My previous reorganization of addressof broke -std=c++03. Thanks much to Arnold Schwaighofer for catching this. This patch also catches a few more missing addressof in <future>, thanks go to Zhihao Yuan for catching these.
...
llvm-svn: 187997
2013-08-08 18:38:55 +00:00
Arnold Schwaighofer
5331e3a481
Revert r187927.
...
Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.
It breaks a clang bootstrap.
llvm-svn: 187959
2013-08-08 03:06:24 +00:00
Howard Hinnant
57f783da4e
Update CREDITS.TXT
...
llvm-svn: 187936
2013-08-07 23:29:10 +00:00
Howard Hinnant
9027f5e3de
Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.
...
llvm-svn: 187927
2013-08-07 23:02:42 +00:00
Marshall Clow
2c1a894061
N3644 support for <unordered_set> and <unordered_map>
...
llvm-svn: 187915
2013-08-07 21:30:44 +00:00
Marshall Clow
36b2a3b0e5
N3644 support for vector<bool>
...
llvm-svn: 187911
2013-08-07 20:53:44 +00:00
Marshall Clow
798061ded6
N3644 support for vector<bool>
...
llvm-svn: 187910
2013-08-07 20:53:38 +00:00
Marshall Clow
07186a7d2d
N3644 support for <string> and <vector>
...
llvm-svn: 187909
2013-08-07 20:48:48 +00:00
Howard Hinnant
303e27d8ce
Correct logic bug in find optimization for vector<bool>. This fixes http://llvm.org/bugs/show_bug.cgi?id=16816
...
llvm-svn: 187908
2013-08-07 20:42:16 +00:00
Howard Hinnant
d098713aaf
War on tabs
...
llvm-svn: 187906
2013-08-07 19:39:48 +00:00
Howard Hinnant
c5582b57c6
Rename time.duration.literals step 3
...
llvm-svn: 187905
2013-08-07 19:39:11 +00:00
Howard Hinnant
35e09c7ad7
Rename time.duration.literals step 2
...
llvm-svn: 187904
2013-08-07 19:36:50 +00:00
Howard Hinnant
453ca75d24
Rename time.duration.literals step 1
...
llvm-svn: 187903
2013-08-07 19:35:46 +00:00
Marshall Clow
e141dc0490
Implement tests for NULL iterators for <array> re: N3644
...
llvm-svn: 187809
2013-08-06 17:17:13 +00:00
Marshall Clow
8fe0a3722c
Implement NULL iterators for <forward_list> and <deque> re: N3644
...
llvm-svn: 187805
2013-08-06 16:14:36 +00:00
Marshall Clow
0c37cfd8b8
Implement NULL iterators for <list> re: N3644
...
llvm-svn: 187740
2013-08-05 21:23:28 +00:00
Howard Hinnant
2f51de568f
debug mode for unordered_map. Also picked up a missing check and test in unordered_multimap. This wraps up debug mode for the unordered containers.
...
llvm-svn: 187659
2013-08-02 17:50:49 +00:00
Howard Hinnant
42a3046eef
Ok, 3 major changes for debug mode in one commit:
...
1. I had been detecting and trapping iterator == and \!= among iterators
in different containers as an error. But the trapping itself is actually
an error.
Consider:
#include <iostream>
#include <vector>
#include <algorithm>
template <class C>
void
display(const C& c)
{
std::cout << "{";
bool first = true;
for (const auto& x : c)
{
if (\!first)
std::cout << ", ";
first = false;
std::cout << x;
}
std::cout << "}\n";
}
int
main()
{
typedef std::vector<int> V;
V v1 = {1, 3, 5};
V v2 = {2, 4, 6};
display(v1);
display(v2);
V::iterator i = std::find(v1.begin(), v1.end(), 1);
V::iterator j = std::find(v2.begin(), v2.end(), 2);
if (*i == *j)
i = j; // perfectly legal
// ...
if (i \!= j) // the only way to check
v2.push_back(*i);
display(v1);
display(v2);
}
It is legal to assign an iterator from one container to another of the
same type. This is required to work. One might want to test whether or
not such an assignment had been made. The way one performs such a check
is using the iterator's ==, \!= operator. This is a logical and necessary
function and does not constitute an error.
2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
This caused a problem in several of the libc++ tests.
Fixed.
3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
std::basic_string is inoperable. std::basic_string uses __wrap_iterator
to implement its iterators. __wrap_iterator has been rigged up in debug
mode to support vector. But string hasn't been rigged up yet. This means
that one gets false positives when using std::string in debug mode. I've
upped std::string's priority in www/debug_mode.html.
llvm-svn: 187636
2013-08-02 00:26:35 +00:00
Howard Hinnant
0be8f64c44
Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
...
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.
This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:
- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
_MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
when _WIN32 is defined.
This leaves _WIN32 for code using the Windows API.
This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.
Nico, please prepare a patch for CREDITS.TXT, thanks.
llvm-svn: 187593
2013-08-01 18:17:34 +00:00
Howard Hinnant
0f242bea10
Taking another swing at correctly optimizing fill_n.
...
llvm-svn: 187587
2013-08-01 17:29:28 +00:00
Howard Hinnant
ce075cf1aa
Constrain fill_n -> memset operations to include implicit convertibility to unsigned char. This fixes http://llvm.org/bugs/show_bug.cgi?id=16764 . Also a drive-by fix on a chrono test suite bug.
...
llvm-svn: 187552
2013-08-01 00:41:55 +00:00
Marshall Clow
a1cd191624
Implement constexpr (n3302) and fix operator *= and /=
...
llvm-svn: 187529
2013-07-31 21:02:34 +00:00
Marshall Clow
df67172d59
Backwards!
...
llvm-svn: 187518
2013-07-31 19:39:37 +00:00
Marshall Clow
a1d0d376c8
Implement n3469 - constexpr for chrono
...
llvm-svn: 187517
2013-07-31 19:32:19 +00:00
Howard Hinnant
4c80bfbd53
Debug mode for unordered_multimap. Some mods were done for unordered_map as well to keep all the tests passing. However unordered_map is at the very least still missing tests, if not functionality (if it isn't tested, it probably isn't working).
...
llvm-svn: 187446
2013-07-30 21:04:42 +00:00
Howard Hinnant
e5c13decbe
Debug mode for unordered_multiset. The exercise spotted a few places I had missed on unordered_set, so I picked those up as well.
...
There are actually two debug modes:
1. -D_LIBCPP_DEBUG2 or -D_LIBCPP_DEBUG2=1
This is a relatively expensive debug mode, but very thorough. This is normally what you want to debug with, but may turn O(1) operations into O(N) operations.
2. -D_LIBCPP_DEBUG2=0
This is "debug lite." Only preconditions that can be checked with O(1) expense are checked. For example range checking on an indexing operation. But not iterator validity.
llvm-svn: 187369
2013-07-29 19:05:47 +00:00
Howard Hinnant
aa5aa98eab
Add operator new[] to test. Partial fix for valgrind warning in http://llvm.org/bugs/show_bug.cgi?id=16703 .
...
llvm-svn: 187358
2013-07-29 14:43:42 +00:00
Marshall Clow
83c08b4497
Implement N3421; comparison predicates<void>
...
llvm-svn: 187357
2013-07-29 14:21:53 +00:00
Howard Hinnant
55d5e76fdb
Glen: Minor tweaks to locale.cpp to help it compile with exceptions turned off.
...
llvm-svn: 187332
2013-07-28 18:20:00 +00:00
Marshall Clow
7aa54577d1
literal suffixes for std::chrono
...
llvm-svn: 187078
2013-07-24 21:18:14 +00:00
Howard Hinnant
b24c802489
Debug mode for unordered_set. I believe this to be fairly complete for
...
unordered_set, however it is not complete yet for unordered_multiset,
unordered_map or unordered_multimap. There has been a lot of work done
for these other three containers, however that work was done just to
keep all of the tests passing.
You can try this out with -D_LIBCPP_DEBUG2. You will have to link to a
libc++.dylib that has been compiled with src/debug.cpp. So far, vector
(but not vector<bool>), list, and unordered_set are treated. I hope to
get the other three unordered containers up fairly quickly now that
unordered_set is done.
The flag _LIBCPP_DEBUG2 will eventually be changed to _LIBCPP_DEBUG, but
not today. This is my second effort at getting debug mode going for
libc++, and I'm not quite yet ready to throw all of the work under the
first attempt away.
The basic design is that all of the debug information is kept in a
central database, instead of in the containers. This has been done as
an attempt to have debug mode and non-debug mode be ABI compatible with
each other. There are some circumstances where if you construct a
container in an environment without debug mode and pass it into debug
mode, the checking will get confused and let you know with a readable
error message. Passing containers the other way: from debug mode out to
a non-debugging mode container should be 100% safe (at least that is the
goal).
llvm-svn: 186991
2013-07-23 22:01:58 +00:00
Marshall Clow
ca0be23b39
Implement string suffixes from N3642
...
llvm-svn: 186956
2013-07-23 17:05:24 +00:00
Howard Hinnant
7491a16031
Bill Fisher: This patch fixes a bug where std::regex in ECMAScript mode was ignoring capture groups inside lookahead assertions.
...
For example, matching /(?=(a))(a)/ to "a" should yield two captures: \1 = "a", \2 = "a"
llvm-svn: 186954
2013-07-23 16:18:04 +00:00
Howard Hinnant
1468d0cec7
Add some friendly messages to libcxx calls to abort().
...
llvm-svn: 186951
2013-07-23 16:05:56 +00:00
Richard Smith
79c06417d1
Add some missing cv-qualifiers.
...
llvm-svn: 186909
2013-07-23 01:24:30 +00:00
Anders Carlsson
8bb1dbbf75
Fix a bug in std::fill_n where memset would end up being called in cases when it shouldn’t.
...
Reviewed by Howard.
llvm-svn: 186875
2013-07-22 21:08:00 +00:00
Marshall Clow
75eff74803
Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of fixing bug #16599 . Thanks to Howard for the review and updates.
...
llvm-svn: 186834
2013-07-22 16:02:19 +00:00
Marshall Clow
8bf1f08a2c
Make std::get constexpr
...
llvm-svn: 186525
2013-07-17 18:25:36 +00:00
Howard Hinnant
fee09c68a0
Add pointer format test for Windows.
...
llvm-svn: 186472
2013-07-16 23:50:06 +00:00
Marshall Clow
18191ceb54
Bug 16599 part 2: Make std::pair's constructors and comparison operators (and make_pair) constexpr.
...
llvm-svn: 186430
2013-07-16 17:45:44 +00:00
Marshall Clow
1c682f0f0c
Make std::forward and std::move (and std::move_if_noexcept) constexpr in C++14
...
llvm-svn: 186344
2013-07-15 20:46:11 +00:00
Howard Hinnant
22161401df
Bill Fisher: This patch fixes an ill-formed comparison when parsing control escapes, e.g. "\cA\ca". The code will now throw an error_escape exception for invalid control sequences like "\c:" or "\c".
...
I've added the test cases to bad_escape.pass.cpp.
llvm-svn: 186335
2013-07-15 18:21:11 +00:00
Howard Hinnant
10f8387b94
A few fixes to tests for Windows port.
...
llvm-svn: 186334
2013-07-15 18:09:11 +00:00
Marshall Clow
f20d2672e2
Add macro _LIBCPP_CONSTEXPR_AFTER_CXX11 for functions that have been marked constexpr post C++11
...
llvm-svn: 186323
2013-07-15 14:57:19 +00:00
Marshall Clow
e99520c72e
Implement n3584 - Addressing Tuples by Type
...
llvm-svn: 186237
2013-07-13 02:54:05 +00:00
Howard Hinnant
6d8a38c537
Port make_[un]signed tests to platforms where sizeof(wchar_t) == 2.
...
llvm-svn: 186136
2013-07-11 23:51:05 +00:00
Howard Hinnant
c815a4e297
Bill Fisher: This patch fixes a less likely case where '\b' can back up into invalid memory, when driven by a regex_iterator (for case 1, see r185273 or http://llvm.org/bugs/show_bug.cgi?id=16240 )
...
The attached test program also supplies a test for the case 1 fix in r185273.
llvm-svn: 186089
2013-07-11 15:32:55 +00:00
Marshall Clow
48c9fe29b2
Improved tests (and fixed a bug in the tests); thanks to Richard Smith for the suggestion
...
llvm-svn: 186022
2013-07-10 18:01:34 +00:00
Marshall Clow
8e1cb5adb3
move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
...
llvm-svn: 185968
2013-07-09 20:34:14 +00:00
Howard Hinnant
dbdeb153d8
Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration.
...
My patch uses to communicate when is false.
llvm-svn: 185950
2013-07-09 17:29:09 +00:00
Howard Hinnant
e0fe3d2e96
War on tabs.
...
llvm-svn: 185865
2013-07-08 21:06:38 +00:00
Marshall Clow
a7b0e5ddf8
Implement n3668 - std::exchange
...
llvm-svn: 185863
2013-07-08 20:54:40 +00:00
Marshall Clow
f331327c6a
Implement n3545 for c++14
...
llvm-svn: 185856
2013-07-08 20:05:31 +00:00
Howard Hinnant
271426e6ab
Windows port for __codecvt_utf8<wchar_t>.
...
llvm-svn: 185849
2013-07-08 19:03:07 +00:00
Howard Hinnant
5e00063b86
Silence -Wint-to-void-pointer-cast warning in test.
...
llvm-svn: 185756
2013-07-06 14:41:36 +00:00
Howard Hinnant
abb160e689
Remove implicit conversion from __value_type to value_type in [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16549
...
llvm-svn: 185711
2013-07-05 18:06:00 +00:00
Howard Hinnant
4a95f9eb7e
Removed extension in [unordered_][multi]map which allowed one to emplace using just an argument for the key, as opposed to using piecewise_construct. However a bug report exposed that this created an unfortunate ambiguity. People who are currently using the extension will be notified the next time they compile, and will have to change to using piecewise_construct. There are no ABI issues with the removal of this extension. This fixes http://llvm.org/bugs/show_bug.cgi?id=16542
...
llvm-svn: 185666
2013-07-04 20:59:16 +00:00
Howard Hinnant
bbdf669bde
Simplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16538
...
llvm-svn: 185665
2013-07-04 19:46:35 +00:00
Joerg Sonnenberger
0644627bef
Fix bashism.
...
llvm-svn: 185646
2013-07-04 15:11:10 +00:00
Marshall Clow
5b2ef2b1a6
Patch for N3655 (Transformation type traits) with Howard's additions
...
llvm-svn: 185597
2013-07-04 00:10:01 +00:00
Marshall Clow
60df5996a4
Commit patch for integer sequences. Suggested by Richard, reworked by Howard, and annotated by me
...
llvm-svn: 185569
2013-07-03 19:20:30 +00:00
Howard Hinnant
84b569d5cf
Matthew Dempsky: Attached patch replaces the type punning with memcpy(), which on
...
x86/x86-64 clang optimizes to direct word accesses anyway. This fixes an unaligned word access in murmurhash/cityhash.
llvm-svn: 185558
2013-07-03 17:39:28 +00:00
Marshall Clow
95ddb53049
Adorn make_unique with visibility and inline attributes
...
llvm-svn: 185468
2013-07-02 20:06:09 +00:00
Joerg Sonnenberger
392a178c33
Don't free the C locale on NetBSD.
...
llvm-svn: 185467
2013-07-02 19:46:18 +00:00
Howard Hinnant
904e587fa9
Updated CREDITS.TXT
...
llvm-svn: 185462
2013-07-02 19:00:29 +00:00
Howard Hinnant
9cfcdcb9e2
Matthew Dempsky: In libc++'s <locale>, there's already dependence on an snprintf_l
...
implementation and all of the char buffers readily have their
allocated size available, so we can easily use snprintf_l instead of
sprintf_l.
This avoids OpenBSD's linker warnings against using sprintf and
vsprintf.
Howard: Please consider a patch for CREDITS.TXT
llvm-svn: 185457
2013-07-02 18:42:28 +00:00
Howard Hinnant
3fc9ef22b3
Constrain launch ~ operator to defined bits.
...
llvm-svn: 185452
2013-07-02 18:01:41 +00:00
Howard Hinnant
ca69356d52
Windows support in thread::hardware_concurrency.
...
llvm-svn: 185451
2013-07-02 17:53:48 +00:00
Howard Hinnant
43bbdd29de
Bill Fisher: This patch fixes a bug where the regex parser doesn't advance the pointer after reading the third character of an octal escape (in awk mode).
...
That is, regex{"\141", awk} results in the regular expression /a1/ instead of just /a/.
llvm-svn: 185449
2013-07-02 17:43:31 +00:00
Howard Hinnant
4a142ec6b0
XFAIL this test on 10.7 and 10.8
...
llvm-svn: 185391
2013-07-01 22:59:14 +00:00
Marshall Clow
28d8ba5f79
Implement n3656 - make_unique. Thanks to Howard for the review and suggestions.
...
llvm-svn: 185352
2013-07-01 18:16:03 +00:00
Marshall Clow
d51891063f
Implement n3658 - Compile-time integer sequences
...
llvm-svn: 185343
2013-07-01 16:26:55 +00:00
Howard Hinnant
eecacc0fad
In istream::ignore, check the delimeter as an int_type, not as a char_type, so as to correctly handle EOF. This fixes http://llvm.org/bugs/show_bug.cgi?id=16427
...
llvm-svn: 185298
2013-07-01 00:37:50 +00:00
Howard Hinnant
9dbbf8dece
The bind and function functor constructors and assignment operators were overly general and getting confused with the copy constructor and copy assignment operators. Constrained them. This fixes http://llvm.org/bugs/show_bug.cgi?id=16385
...
llvm-svn: 185297
2013-07-01 00:01:51 +00:00
Howard Hinnant
9bf42533b7
Fix bind by making _is_valid_bind_return more robust. It should return false instead of give a compile time error, always. The problem was down in ____mu_return, the version that handles nested bind objects. This fixes http://llvm.org/bugs/show_bug.cgi?id=16343
...
llvm-svn: 185289
2013-06-30 19:48:15 +00:00
Howard Hinnant
8bd1771abe
Matthew Dempsky: POSIX defines that the _POSIX_C_SOURCE macros are to be set by user
...
code to specify what version of POSIX the system should provide. If
you want to check what version of POSIX is actually available, you're
supposed to test _POSIX_VERSION.
However, since sysconf() has been in POSIX since 1995, it's probably
safe to assume it's available on any system with a C++11 compiler,
especially if _SC_NPROCESSORS_ONLN is defined too. So no point in a
complicated preprocessor rule if just we unconditionally include
<unistd.h> (on non-Windows systems).
Also, I've added a #warning for to help porters detect when a suitable
implementation isn't detected at compile-time.
Howard: Matthew, can you patch CREDITS.TXT? Thanks.
llvm-svn: 185275
2013-06-30 00:14:43 +00:00
Howard Hinnant
27841fd803
Matthew Dempsky: Same as stdexcept.cpp in libc++abi: we've already computed 'len strlen(msg)', so we can use memcpy() instead of strcpy().
...
llvm-svn: 185274
2013-06-29 23:53:20 +00:00
Howard Hinnant
660f2ae422
Prevent '\b' from backing up into invalid memory. Fixes http://llvm.org/bugs/show_bug.cgi?id=16240 . Sorry, I can not think of a good test case for this one, except by running valgrind as reported in the bug.
...
llvm-svn: 185273
2013-06-29 23:45:43 +00:00
Howard Hinnant
1836462545
Add operators to make launch a bitmask type. Searched all of the standard, and libc++ to see if this error occurred elsewhere and didn't see any other place. This fixes http://llvm.org/bugs/show_bug.cgi?id=16207
...
llvm-svn: 185265
2013-06-29 18:38:17 +00:00
Howard Hinnant
e9672d0448
Make cout a little more thread-safe. This fixes http://llvm.org/bugs/show_bug.cgi?id=12158
...
llvm-svn: 185222
2013-06-28 21:40:28 +00:00
Howard Hinnant
3f75953d82
Provide missing '{' in parsing extended quoted characters. This fixes http://llvm.org/bugs/show_bug.cgi?id=16135
...
llvm-svn: 185211
2013-06-28 20:31:05 +00:00
Howard Hinnant
8d1e822432
William Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. When makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text. This fixes http://llvm.org/bugs/show_bug.cgi?id=11118
...
llvm-svn: 185196
2013-06-28 19:11:23 +00:00
Howard Hinnant
21246e3314
Bill Fisher: Fix for failing to throw an exception in regex when parsing an invalid escape sequence. This fixes http://llvm.org/bugs/show_bug.cgi?id=16023
...
llvm-svn: 185192
2013-06-28 18:57:30 +00:00
Howard Hinnant
afe8b967cc
Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
...
llvm-svn: 185181
2013-06-28 18:09:35 +00:00
Howard Hinnant
eec721826c
Implement full support for non-pointer pointers in custom allocators for string. This completes the custom pointer support for the entire library.
...
llvm-svn: 185167
2013-06-28 16:59:19 +00:00
Howard Hinnant
3ec1f00b73
Implement full support for non-pointer pointers in custom allocators for vector.
...
llvm-svn: 185093
2013-06-27 19:35:32 +00:00
Howard Hinnant
866d4efa7f
Implement full support for non-pointer pointers in custom allocators for list.
...
llvm-svn: 184859
2013-06-25 16:08:47 +00:00
Howard Hinnant
8a27ba8051
Implement full support for non-pointer pointers in custom allocators for forward_list.
...
llvm-svn: 184759
2013-06-24 17:17:28 +00:00
Dmitri Gribenko
c3f9c80894
Fix typo in assertion message. Reported by Shriramana Sharma.
...
llvm-svn: 184691
2013-06-24 06:15:57 +00:00
Howard Hinnant
14e200d14d
Implement full support for non-pointer pointers in custom allocators for deque.
...
llvm-svn: 184673
2013-06-23 21:17:24 +00:00
Howard Hinnant
307f814372
Implement full support for non-pointer types in custom allocators. This is for the unordered containers only. This work still needs to be done on the sequence containers.
...
llvm-svn: 184635
2013-06-22 15:21:29 +00:00
Howard Hinnant
07d3eccd26
Implement full support for non-pointer types in custom allocators. This is for the associative containers only. This work still needs to be done on the unordered and sequence containers. Fixes http://llvm.org/bugs/show_bug.cgi?id=15978
...
llvm-svn: 184358
2013-06-19 21:29:40 +00:00
Howard Hinnant
e7b6d544f0
Test case for r183481.
...
llvm-svn: 183522
2013-06-07 14:24:18 +00:00
Howard Hinnant
30444adc70
Minor bug fix for allowing an extension of const-qualified types in containers.
...
llvm-svn: 183481
2013-06-07 01:56:37 +00:00
Howard Hinnant
9d3ccc700f
Neglected to remove a debugging comment from last commit.
...
llvm-svn: 182422
2013-05-21 21:19:35 +00:00
Howard Hinnant
849821cffb
Fix a couple of bugs in linear_congruential_engine::seed. Regression test added.
...
llvm-svn: 182421
2013-05-21 21:05:12 +00:00
Joerg Sonnenberger
50544e7e65
Add NetBSD support.
...
llvm-svn: 182162
2013-05-17 21:17:34 +00:00
Joerg Sonnenberger
df6bbaa528
Create a weak pthread_create reference on NetBSD to not force a
...
dependency on libpthread for code that doesn't use threads itself.
llvm-svn: 182161
2013-05-17 21:16:18 +00:00
Howard Hinnant
9daaf5775c
Glen: This patch gets the string conversion functions working on Windows. It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability.
...
llvm-svn: 182026
2013-05-16 17:13:40 +00:00
Howard Hinnant
0125ab809f
Remove cv qualifiers from member pointers in the __member_pointer_traits test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests.
...
llvm-svn: 181935
2013-05-15 21:49:27 +00:00
David Blaikie
f13dbe4799
Fixing the MSan/compiler-rt build
...
Patch by Evgieniy Stepanov, review by İsmail Dönmez.
llvm-svn: 181740
2013-05-13 21:53:44 +00:00
Howard Hinnant
9449989601
İsmail Dönmez: Enable quick_exit on linux.
...
llvm-svn: 181612
2013-05-10 17:36:59 +00:00
David Dean
a9ac518364
XFAIL this test when using the darwin12 system library. Reviewed by Howard
...
llvm-svn: 181610
2013-05-10 17:25:57 +00:00
Marshall Clow
fce85ba455
Fix incorrect type usage; nice catch by Sebastian
...
llvm-svn: 181569
2013-05-10 00:16:10 +00:00
Joerg Sonnenberger
dd6a025986
Don't try to free the C locale.
...
llvm-svn: 181559
2013-05-09 23:06:35 +00:00
Marshall Clow
0b0bbd2f22
Implement n3607: 'equal', 'mismatch', and 'is_permutation'
...
llvm-svn: 181548
2013-05-09 21:14:23 +00:00
Joerg Sonnenberger
8a5a9dfb5d
Initialize codecvt explicitly with the C locale, which might not be 0.
...
llvm-svn: 181534
2013-05-09 19:00:18 +00:00
Howard Hinnant
266abefed0
Put a 1-character unget buffer into cin. This fixes http://llvm.org/bugs/show_bug.cgi?id=15867
...
llvm-svn: 181470
2013-05-08 21:18:42 +00:00
Howard Hinnant
866ed94db1
Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
...
llvm-svn: 181377
2013-05-07 23:40:12 +00:00
Howard Hinnant
81aa5cb804
Introduce _LIBCPP_STD_VER. This can be set by the client (or the clang driver). Or it will be defaulted. The default is 11 if -std= c++11 or eariler, else it will default to the current year modulo the century. We anticipate it defaulting to 14 for C++14 when the time comes. For now, post-C++11 libcxx implementations should protect themselves with #if _LIBCPP_STD_VER > 11.
...
llvm-svn: 181347
2013-05-07 20:16:13 +00:00
Howard Hinnant
6b1455f6f1
Mark some tests with XFAIL for Lion and Mountain Lion.
...
llvm-svn: 181336
2013-05-07 17:37:19 +00:00
Howard Hinnant
eedfabd96e
Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
...
llvm-svn: 181217
2013-05-06 16:58:36 +00:00
Howard Hinnant
da9ca0b405
Stephan Tolksdorf: fixes the issue in the <atomic> header and adds corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro).
...
The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor.
llvm-svn: 180945
2013-05-02 20:18:43 +00:00
Joerg Sonnenberger
f380515753
The push/pop variant of pragma GCC diagnostic is only supported by Clang
...
and GCC 4.6 and newer, so protect accordingly.
llvm-svn: 180943
2013-05-02 19:34:26 +00:00
Joerg Sonnenberger
087e35ec03
Make it possible to provide special (linker) flags for the thread tests.
...
Use it to build & link against libpthread on NetBSD for tests iff they
are testing the thread interface.
llvm-svn: 180942
2013-05-02 19:21:36 +00:00
Joerg Sonnenberger
aa05f9eaf3
Add explicit casts to unsigned char before calling ctype functions.
...
Fixes the value range on platforms with signed char.
llvm-svn: 180940
2013-05-02 19:17:48 +00:00
Howard Hinnant
35abaab7d3
This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.
...
llvm-svn: 180811
2013-04-30 21:44:48 +00:00
Joerg Sonnenberger
3f9d685941
Add entry for myself.
...
llvm-svn: 180728
2013-04-29 19:55:32 +00:00
Joerg Sonnenberger
21883e9478
Use protected version of the malloc attribute in case source wants to
...
define malloc as macro.
llvm-svn: 180727
2013-04-29 19:52:08 +00:00
Joerg Sonnenberger
a39fe8c59e
GCC doesn't support __has_attribute.
...
llvm-svn: 180683
2013-04-27 20:51:42 +00:00
Joerg Sonnenberger
85ad6c99c7
Use static_cast.
...
llvm-svn: 180680
2013-04-27 19:13:31 +00:00
Joerg Sonnenberger
2ed7030c1a
Use reinterpret_casts directly in place of C-style casts.
...
llvm-svn: 180679
2013-04-27 19:12:36 +00:00
Joerg Sonnenberger
ff3ce2bdc0
Only use Clang pragma when compiling with clang.
...
llvm-svn: 180678
2013-04-27 19:10:15 +00:00
Joerg Sonnenberger
f53c3ca9eb
Fix typos.
...
llvm-svn: 180598
2013-04-26 09:40:18 +00:00
Howard Hinnant
a2ee3a6e2e
İsmail Dönmez: Change to mktemp template to make it compatible with Linux.
...
llvm-svn: 180267
2013-04-25 16:08:55 +00:00
Howard Hinnant
03ec04f9b5
default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
...
llvm-svn: 180213
2013-04-24 19:44:26 +00:00
Joerg Sonnenberger
4341ad3500
Avoid bash specific functionality to work with any POSIX shell
...
implementing $(( )).
llvm-svn: 180139
2013-04-23 19:53:24 +00:00
Bob Wilson
5a348a12bd
Change makefile comment to refer to libc++ instead of libcpp.
...
llvm-svn: 180135
2013-04-23 19:26:55 +00:00
Bob Wilson
03fa38aa5b
PR15820: Use tar instead of rsync to install the headers.
...
llvm-svn: 180132
2013-04-23 18:51:51 +00:00
Bob Wilson
01fee349d9
PR12597: Remove "chown -R root:wheel" from the makefile.
...
llvm-svn: 180122
2013-04-23 17:30:35 +00:00
Howard Hinnant
f8bb3e522d
Zero-initialize all mbstate_t in the codecvt tests.
...
llvm-svn: 180108
2013-04-23 14:09:35 +00:00
Howard Hinnant
210051548e
Modest performance improvement for std::string's operator==.
...
llvm-svn: 180072
2013-04-22 23:55:13 +00:00
Howard Hinnant
20428e94e0
Somehow aligned_union got dropped through the cracks. This adds it. Did a drive-by fix of alignment_of while I was in the neighborhood.
...
llvm-svn: 180036
2013-04-22 19:37:49 +00:00
Howard Hinnant
ab65a6f560
After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case.
...
llvm-svn: 179760
2013-04-18 15:02:57 +00:00
Howard Hinnant
9a20da75ef
I believe this finishes up debug mode for list. The testing is a little weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on.
...
llvm-svn: 179632
2013-04-16 21:42:36 +00:00
Howard Hinnant
c5894133bc
Added extra space to end of EXTRA_FLAGS in buildit. This fixes http://llvm.org/bugs/show_bug.cgi?id=15761
...
llvm-svn: 179609
2013-04-16 17:34:20 +00:00
Howard Hinnant
c76d2bda6f
addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
...
llvm-svn: 179608
2013-04-16 17:27:56 +00:00
Howard Hinnant
e7389a6915
Numeric parsing was getting the wrong answer when faced with very long inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740
...
llvm-svn: 179556
2013-04-15 20:40:06 +00:00
Howard Hinnant
f3b02b17af
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
...
llvm-svn: 179467
2013-04-14 00:01:13 +00:00
Howard Hinnant
40487ca25e
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
llvm-svn: 179461
2013-04-13 18:19:25 +00:00
Howard Hinnant
24afdf71c1
Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
...
llvm-svn: 179408
2013-04-12 20:22:57 +00:00
Howard Hinnant
98381453c0
Change <cwchar> and <cstring> to look out for flags which may or may not be set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr. This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there.
...
llvm-svn: 179041
2013-04-08 18:59:28 +00:00
Howard Hinnant
f750923161
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
...
llvm-svn: 178892
2013-04-05 17:58:52 +00:00
Howard Hinnant
1b81829979
More list debug mode tests.
...
llvm-svn: 178873
2013-04-05 15:04:10 +00:00
Howard Hinnant
b0e4c9d01b
More work on debug mode for list.
...
llvm-svn: 178819
2013-04-05 00:18:49 +00:00
Howard Hinnant
b13fcad677
Somehow search_n never got tested, so of course it had a bug in it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15667 .
...
llvm-svn: 178764
2013-04-04 15:40:48 +00:00
Howard Hinnant
ea48b6dcd0
Fix stupid but harmless type-o. Fixes http://llvm.org/bugs/show_bug.cgi?id=15657 .
...
llvm-svn: 178691
2013-04-03 20:29:45 +00:00
Howard Hinnant
1347d33451
The move / swap members were not correctly taking all of the possible states of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659 .
...
llvm-svn: 178690
2013-04-03 20:21:29 +00:00
Howard Hinnant
459448241a
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
...
llvm-svn: 178581
2013-04-02 22:14:51 +00:00
Howard Hinnant
516487765a
The cmake script is failing to copy cxxabi.h to the right place because it was generating to destination path like so /include// and dstdir can legally be blank from my interpretation of the script, and this would then generate a path like libcxx/include// which is illegal.
...
llvm-svn: 178579
2013-04-02 21:33:01 +00:00
Howard Hinnant
575e4e3650
Richard Smith: It was pointed out to me off-list that libc++'s non-compiler-builtin
...
implementation of std::is_polymorphic does this:
template <class _Tp> struct __is_polymorphic1 : public _Tp {};
... and that g++ rejects this if _Tp has an inaccessible virtual destructor
(because __is_polymorphic1<_Tp> would have a deleted virtual destructor
overriding _Tp's non-deleted destructor). Clang was failing to reject this;
I've fixed that in r178563, but that causes libc++'s corresponding test
case to fail with both clang and gcc when using the fallback
implementation. The fallback code also incorrectly rejects final types.
The attached patch fixes the fallback implementation of is_polymorphic; we
now use dynamic_cast's detection of polymorphic class types rather than
trying to determine if adding a virtual function makes the type larger:
enable_if<sizeof((_Tp*)dynamic_cast<const volatile
void*>(declval<_Tp*>())) != 0, ...>
Two things of note here:
* the (_Tp*) cast is necessary to work around bugs in Clang and g++ where
we otherwise don't instantiate the dynamic_cast (filed as PR15656)
* the 'const volatile' is here to treat is_polymorphic<cv T> as true for a
polymorphic class type T -- my reading of the standard suggests this is
incorrect, but it matches our builtin __is_polymorphic and gcc
llvm-svn: 178576
2013-04-02 21:25:06 +00:00
Howard Hinnant
70e19bd31e
Some debug test cases for list.
...
llvm-svn: 178565
2013-04-02 19:53:32 +00:00
Howard Hinnant
ad36fe5c19
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html
...
llvm-svn: 178545
2013-04-02 15:48:56 +00:00
Howard Hinnant
39e9506a1e
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.html
...
llvm-svn: 178544
2013-04-02 15:46:31 +00:00
Howard Hinnant
cf1dc8d39e
Test case was forming the wrong limits when size_t != unsigned long.
...
llvm-svn: 178370
2013-03-29 21:22:22 +00:00
Howard Hinnant
9cb970074f
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
llvm-svn: 178354
2013-03-29 18:27:28 +00:00
Howard Hinnant
84718fde7a
The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are disabled, so #ifdef'ing out the test.
...
llvm-svn: 178350
2013-03-29 17:20:04 +00:00
Howard Hinnant
97b8ebe600
I believe debug mode for vector<T> (T != bool) is complete. If anyone sees anything more they would like to see on it, please let me know. Debug mode is activated by compiling with -D_LIBCPP_DEBUG2=1. Eventually _LIBCPP_DEBUG2 will be renamed to just _LIBCPP_DEBUG.
...
llvm-svn: 178288
2013-03-28 20:35:29 +00:00
Howard Hinnant
e00e6f23d3
Fix a few warnings/errors for compiling with -fno-exceptions.
...
llvm-svn: 178267
2013-03-28 18:56:26 +00:00
Howard Hinnant
b3adefc34c
Second try at r178075. The llvm breakage has been fixed by r178240.
...
llvm-svn: 178253
2013-03-28 17:44:32 +00:00
Howard Hinnant
a4d35ce2bf
Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.
...
llvm-svn: 178237
2013-03-28 15:00:04 +00:00
Daniel Dunbar
15eaebea15
Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
...
bootstrap with libc++.
llvm-svn: 178116
2013-03-27 04:10:25 +00:00
Howard Hinnant
5a13d8dcea
Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point.
...
llvm-svn: 178075
2013-03-26 21:40:54 +00:00
Howard Hinnant
cd4a9fd301
Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576 .
...
llvm-svn: 178064
2013-03-26 19:04:56 +00:00
Howard Hinnant
1d8a5164b4
More vector debug tests.
...
llvm-svn: 178033
2013-03-26 15:45:56 +00:00
Marshall Clow
a6d24cc19d
Fixed race conditions in thread tests; exposed by UBSan
...
llvm-svn: 178029
2013-03-26 15:28:33 +00:00
Howard Hinnant
ea95898f29
Simply debug mode tests per Dmitri Gribenko's suggestion.
...
llvm-svn: 178026
2013-03-26 14:28:25 +00:00
Howard Hinnant
d9db9f90fb
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
...
llvm-svn: 178016
2013-03-26 13:48:57 +00:00
Howard Hinnant
ea1bbbd135
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
...
llvm-svn: 177929
2013-03-25 22:12:26 +00:00
Howard Hinnant
b14037be89
Remove some erroneous code I was using to debug debug mode.
...
llvm-svn: 177908
2013-03-25 20:46:07 +00:00
Howard Hinnant
2d752fc2f9
Debug mode tests for vector::front and back.
...
llvm-svn: 177904
2013-03-25 20:31:25 +00:00
Howard Hinnant
35b3b54548
More vector::iterator debug mode tests. Run by adding to OPTIONS -D_LIBCPP_DEBUG2=1.
...
llvm-svn: 177897
2013-03-25 20:03:19 +00:00
Howard Hinnant
92bd7c0337
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.
...
llvm-svn: 177892
2013-03-25 19:29:35 +00:00
Howard Hinnant
a60ae88db2
Marshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution.
...
llvm-svn: 177826
2013-03-23 19:29:45 +00:00
Howard Hinnant
65a87ccdbf
This is a start at making the libc++ test suite friendlier to the -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously.
...
llvm-svn: 177824
2013-03-23 17:27:16 +00:00
Howard Hinnant
7c5b88b134
Test cleanup with respect to use of deprecated tmpnam function. Also Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h
...
llvm-svn: 177755
2013-03-22 20:05:40 +00:00
Marshall Clow
c962cdf8a5
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
llvm-svn: 177694
2013-03-22 02:14:40 +00:00
Marshall Clow
1c2c986796
Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator./a.out Found by UBSan
...
llvm-svn: 177693
2013-03-22 02:13:55 +00:00
Marshall Clow
761b5cf087
Fix bug in test; found by AddressSanitizer
...
llvm-svn: 177464
2013-03-20 00:01:48 +00:00
Howard Hinnant
4bb98d0917
Marshall Clow found this memory problem in strstream using -fsanitize=address on the test suite.
...
llvm-svn: 177452
2013-03-19 22:16:57 +00:00
Howard Hinnant
591ebe3cbb
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences.
...
llvm-svn: 177443
2013-03-19 21:34:48 +00:00
Marshall Clow
1c00ce5070
Fix bug in test; found by AddressSanitizer
...
llvm-svn: 177355
2013-03-18 23:39:36 +00:00
Marshall Clow
69e76f80e2
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
llvm-svn: 177310
2013-03-18 19:34:07 +00:00
Marshall Clow
7415c8b171
Removed raw references to _MSC_VER; now just check to see if it is defined.
...
llvm-svn: 177304
2013-03-18 18:20:48 +00:00
Marshall Clow
b56e8587af
Removed raw references to __APPLE__; now just check to see if it is defined.
...
llvm-svn: 177297
2013-03-18 17:45:34 +00:00
Marshall Clow
91907cbe82
Removed raw references to _WIN32; now just check to see if it is defined.
...
llvm-svn: 177291
2013-03-18 17:04:29 +00:00
Howard Hinnant
5efca64dd9
This should be nothing but a load-time optimization. I'm trying to reduce load time initializers and this is a big one. No visible functionality change intended.
...
llvm-svn: 177212
2013-03-16 00:17:53 +00:00
Marshall Clow
928f65a8aa
Updated link to Marshall's instructions
...
llvm-svn: 177099
2013-03-14 19:00:34 +00:00
Howard Hinnant
d70e6570fd
Some forward-looking and optimistic documentation.
...
llvm-svn: 177093
2013-03-14 18:37:48 +00:00
Howard Hinnant
41801f14ed
This SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin. Added. I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin. The current testsuite setup does not have a way a good way to test std::cin.
...
llvm-svn: 176822
2013-03-11 19:53:48 +00:00
Howard Hinnant
7e4844b353
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
llvm-svn: 176711
2013-03-08 19:06:24 +00:00
Howard Hinnant
c60bf548c5
Albert Wong: definition for regex_traits<_CharT>::__regex_word.
...
llvm-svn: 176640
2013-03-07 19:38:08 +00:00
Howard Hinnant
ead480d30a
Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available. This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).
...
llvm-svn: 176639
2013-03-07 19:25:03 +00:00
Howard Hinnant
6e41256f68
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
llvm-svn: 176593
2013-03-06 23:30:19 +00:00
Howard Hinnant
65f58f3fe8
Have basic_istream::read call sgetn intead of sbumpc individual characters. This addresses http://llvm.org/bugs/show_bug.cgi?id=15427 .
...
llvm-svn: 176573
2013-03-06 19:27:56 +00:00
Howard Hinnant
3fb6c6e50d
Correct silly type-o. Thanks Richard.
...
llvm-svn: 176568
2013-03-06 18:16:12 +00:00
Howard Hinnant
53b9ee061f
The bitset(unsigned long long) constructor was broken by the constexpr additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444 .
...
llvm-svn: 176559
2013-03-06 17:30:26 +00:00
Howard Hinnant
5b22e99e77
Michael van der Westhuizen: correction to the libcxx build instructions when built with libcxxrt on Linux.
...
llvm-svn: 176093
2013-02-26 16:27:55 +00:00
Howard Hinnant
a9f698009f
Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
...
llvm-svn: 176026
2013-02-25 15:50:36 +00:00
Howard Hinnant
c0c9748c11
Constrain bind operator()() to not exist if the call is not valid. Fixes http://llvm.org/bugs/show_bug.cgi?id=15295 .
...
llvm-svn: 175774
2013-02-21 18:16:55 +00:00
David Chisnall
8b6a4de64a
Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.
...
This change removes the spurious m.unlock() call.
If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.
llvm-svn: 175506
2013-02-19 11:28:45 +00:00
Howard Hinnant
65af0388b9
Bruce Mitchener: Minor typo fixes.
...
llvm-svn: 175274
2013-02-15 15:37:50 +00:00
Daniel Dunbar
62b943935d
[tests] Add support for a link_flags lit parameter.
...
- This is useful for testing with custom ABI libraries.
- Patch by Michael van der Westhuizen.
llvm-svn: 174997
2013-02-12 19:28:51 +00:00
Daniel Dunbar
496f1765a2
[tests] Another batch of timeout increases.
...
llvm-svn: 174902
2013-02-11 21:04:34 +00:00
Howard Hinnant
af00dc0420
Michael van der Westhuizen: Update instructions for building on Linux.
...
llvm-svn: 174733
2013-02-08 19:10:36 +00:00
Howard Hinnant
50232e50d8
Add Michael van der Westhuizen to CREDITS.TXT
...
llvm-svn: 174732
2013-02-08 19:08:06 +00:00
Howard Hinnant
0e2f292a30
Michael van der Westhuizen: update to CMake.
...
llvm-svn: 174731
2013-02-08 19:04:53 +00:00
Daniel Dunbar
ceb47bb06d
[tests] Another batch of timeout increases.
...
llvm-svn: 174726
2013-02-08 18:26:55 +00:00
Daniel Dunbar
76efb57666
[tests] Add back stdc macros I accidentally refactored out.
...
- Patch by Michael van der Westhuizen:
--
r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic. This small patch re-adds the macros.
Making this change fixes the following tests on Linux:
- depr/depr.c.headers/inttypes_h.pass.cpp
- depr/depr.c.headers/stdint_h.pass.cpp
- input.output/file.streams/c.files/cinttypes.pass.cpp
- language.support/cstdint/cstdint.syn/cstdint.pass.cpp
--
llvm-svn: 174722
2013-02-08 17:41:28 +00:00
Daniel Dunbar
577e696425
[tests] Increase a bunch of wait limits.
...
- Basically I just ran the thread tests many many times on a busy machine and
bumped the timeouts whenever I hit a test failure.
- This is obviously subpar, but is the best I can do without the tests being
rewritten to not depend on arbitrary timeouts.
llvm-svn: 174721
2013-02-08 17:41:19 +00:00
Marshall Clow
b6e5f854f5
Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
...
llvm-svn: 174669
2013-02-07 22:12:02 +00:00
Marshall Clow
0749262a11
Belt and suspenders when calling sysconf
...
llvm-svn: 174642
2013-02-07 18:48:09 +00:00
Marshall Clow
63f700e4d1
Another libc++ warning suppression on Linux; no functionality change
...
llvm-svn: 174637
2013-02-07 17:37:58 +00:00
Marshall Clow
d58e0f5505
More libc++ warning suppression on Linux; no functionality change
...
llvm-svn: 174636
2013-02-07 17:20:56 +00:00
Howard Hinnant
aba500d633
Revert accidental check-in. These changes are probably good, but premature at this point.
...
llvm-svn: 174625
2013-02-07 15:31:44 +00:00
Howard Hinnant
804f9116e5
Michael van der Westhuizen: The attached patch add support for building against libc++abi and libcxxrt to CMake builds of libc++.
...
Usage (with the appropriate CC and CXX environment variables) is:
$ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx
and:
$ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx
llvm-svn: 174623
2013-02-07 15:27:39 +00:00
Marshall Clow
eb159ee704
Clean up some warnings for Linux build; No functionality change
...
llvm-svn: 174611
2013-02-07 14:22:51 +00:00
Daniel Dunbar
bdd4ec71db
[build/Darwin] Use the correct libc++abi reexport list.
...
- This updates the build script to match the change originally in r149634, so
that we re-export symbols from libc++abi appropriately.
llvm-svn: 174563
2013-02-07 00:24:19 +00:00
Daniel Dunbar
6bd3374de2
[build] Detabify.
...
llvm-svn: 174562
2013-02-07 00:24:17 +00:00
Howard Hinnant
d3d4356f6e
Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
...
llvm-svn: 174544
2013-02-06 21:03:39 +00:00
Howard Hinnant
584a65befd
Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often.
...
llvm-svn: 174539
2013-02-06 20:25:56 +00:00
Daniel Dunbar
05abe9372b
[tests] Infer the cxx_under_test (as clang++).
...
- This is a reasonable default, and makes testing just work with no required
parameters.
- Add notes on all of the inferred or default values.
llvm-svn: 174538
2013-02-06 20:24:23 +00:00
Daniel Dunbar
5178942ded
[tests] Change test default to run against locally built library.
...
llvm-svn: 174528
2013-02-06 17:47:08 +00:00
Daniel Dunbar
d2d614cd84
[tests] Enable use_system_lib support on Linux.
...
- Patch by Michael van der Westhuizen.
llvm-svn: 174527
2013-02-06 17:45:53 +00:00
Daniel Dunbar
434fb1f6d5
[tests] One last batch of XFAILs, for tests using new symbols added to libc++.
...
- As of this commit, the test suite should now fully pass on both darwin11 and
darwin12 when testing against either a locally built libc++ or the system libc++.
llvm-svn: 174478
2013-02-06 00:59:06 +00:00
Daniel Dunbar
76ff8b54b3
[build] Create the link for the final library install name in the lib dir.
...
- Otherwise, we never were actually linking against the right library when
building the test applications.
llvm-svn: 174470
2013-02-06 00:04:54 +00:00
Daniel Dunbar
ba65d61767
[tests] Accept XFAIL arguments that match any part of a feature.
...
llvm-svn: 174469
2013-02-06 00:04:52 +00:00
Daniel Dunbar
36860df355
[tests] XFAIL some locale tests that don't seem to work on any Darwin.
...
llvm-svn: 174459
2013-02-05 22:51:20 +00:00
Daniel Dunbar
b6354a0767
[tests] If no explicit target triple is given, try to infer it.
...
llvm-svn: 174454
2013-02-05 22:28:03 +00:00
Daniel Dunbar
a563f32c6a
[tests] Mark another stream input expected failure (with system libc++).
...
llvm-svn: 174453
2013-02-05 22:21:52 +00:00
Daniel Dunbar
d0f05fb1b7
[tests] Mark another stream input expected failure (with system libc++).
...
llvm-svn: 174452
2013-02-05 22:10:28 +00:00
Daniel Dunbar
5ce9a5358b
[tests] Mark some string.conversions expected failures (with system libc++).
...
llvm-svn: 174451
2013-02-05 22:10:27 +00:00
Daniel Dunbar
1a7f7bc6bf
[tests] XFAIL a few things that require libc (?) support missing on Darwin.
...
llvm-svn: 174450
2013-02-05 22:10:25 +00:00
Daniel Dunbar
d15f013dc2
[tests] Mark some istream.unformatted expected failures (with system libc++).
...
llvm-svn: 174444
2013-02-05 21:43:32 +00:00
Daniel Dunbar
582c97defa
[tests] Add an available feature that combines the triple and use_system_lib.
...
- This is so that we can easily write XFAIL markers for tests that are known
to fail with versions of libc++ as were shipped with a particular triple.
llvm-svn: 174443
2013-02-05 21:43:30 +00:00
Daniel Dunbar
f51f0319bb
[tests] Add support for REQUIRES and XFAIL lines in libc++ tests.
...
- We parse up to the first non-empty non-comment (C++ style) line, otherwise
the format and semantics match what is used for LLVM/Clang tests.
- For now, the only interesting thing to test against is a user supplied
target_triple test parameter.
llvm-svn: 174440
2013-02-05 21:03:25 +00:00
Daniel Dunbar
8495871807
[tests] Add a 'use_system_lib' parameter.
...
- This controls whether to execute against the locally built library or
not. The default is currently True which maps to what was already being done
by default.
- I'd appreciate it if someone can implement the proper handling of this flag
on linux, I no longer remember the details of its .so handling.
llvm-svn: 174404
2013-02-05 18:03:49 +00:00
Howard Hinnant
2446649c1e
Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
...
template typename deductions on swap<> (used in string.cpp). Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value. Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.
llvm-svn: 173172
2013-01-22 17:26:08 +00:00
Howard Hinnant
f55c0db8b5
Saleem Abdulrasool: __terminate_handler and __unexpected_handler are defined but not used when
...
building against libsupc++ as the functions for which they are used are provided
by libsupc++. Simply preprocess them away when building against libsupc++.
llvm-svn: 173165
2013-01-22 14:48:10 +00:00
Howard Hinnant
2ac1ae6150
Saleem Abdulrasool: Ensure that __GLIBCXX__ is defined when building with libsupc++.
...
llvm-svn: 173164
2013-01-22 14:44:06 +00:00
Howard Hinnant
ead15d1f95
Implement the ATOMIC_*_LOCK_FREE macros.
...
llvm-svn: 173084
2013-01-21 20:39:41 +00:00
Howard Hinnant
8d3e797444
Donated anonymously: This enables GCC 4.8.0 to build libc++.
...
llvm-svn: 173060
2013-01-21 17:26:55 +00:00
Howard Hinnant
d27745e4fb
Make a few tests optimization-proof. These tests were failing under -O3 because the optimizer was eliminating the call to new.
...
llvm-svn: 172631
2013-01-16 17:56:06 +00:00
Howard Hinnant
3d7eb2f806
Optimize basic_ostream::write by having it call sputn instead of sputc.
...
llvm-svn: 172542
2013-01-15 17:22:03 +00:00
Howard Hinnant
980e7e7402
Make <cmath> classification macros work with integral types.
...
llvm-svn: 172461
2013-01-14 20:56:22 +00:00
Howard Hinnant
2153d69672
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934 .
...
llvm-svn: 172456
2013-01-14 20:01:24 +00:00
Howard Hinnant
1afbabab32
Fix string conversions functions to throw out_of_range properly. Fixes http://llvm.org/bugs/show_bug.cgi?id=14919 .
...
llvm-svn: 172447
2013-01-14 18:59:43 +00:00
Howard Hinnant
3778f27b23
Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892 .
...
llvm-svn: 172436
2013-01-14 17:12:54 +00:00
Howard Hinnant
f1e633c154
Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648 .
...
llvm-svn: 172435
2013-01-14 17:07:27 +00:00
Howard Hinnant
8d9aec8802
Fix exception safety bug in vector::push_back
...
llvm-svn: 172250
2013-01-11 20:36:59 +00:00
Marshall Clow
4476100a2f
Made test output iterators have value_type of 'void'; matches ones in library
...
llvm-svn: 171980
2013-01-09 17:20:02 +00:00
Marshall Clow
322270842c
Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files
...
llvm-svn: 171594
2013-01-05 03:21:01 +00:00
Howard Hinnant
114676622f
atomic_bool was missing (just a typedef to atomic<bool>).
...
llvm-svn: 171498
2013-01-04 18:58:50 +00:00
Marshall Clow
f8c2b82337
...and then there was one. Only one copy of 'iterators.h' in the test tree for libc++
...
llvm-svn: 171479
2013-01-04 18:24:04 +00:00
Marshall Clow
f941359201
Removed another copy of 'iterators.h' files in libcxx/test
...
llvm-svn: 171456
2013-01-03 03:57:56 +00:00
Marshall Clow
cf1589f749
Removed several more different 'iterators.h' files in libcxx/test
...
llvm-svn: 171452
2013-01-03 02:29:29 +00:00
Marshall Clow
9b726d242f
Removed 7 (of 8) different 'iterators.h' files in test/localization
...
llvm-svn: 171443
2013-01-03 01:45:09 +00:00
Howard Hinnant
5b5e5336a4
Updating CREDITS.TXT
...
llvm-svn: 171347
2013-01-01 16:09:11 +00:00
NAKAMURA Takumi
43632a26a5
Update the copyright coredits -- Happy new year 2013!
...
llvm-svn: 171342
2013-01-01 10:00:19 +00:00
Howard Hinnant
861f006d3f
Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
...
llvm-svn: 171321
2012-12-31 20:09:48 +00:00
Michael J. Spencer
bb8cfd0fec
[CMake] Fix c++ abi library configuration on Linux.
...
You can now configure from the command line using:
-DLIBCXX_CXX_ABI=libsupc++
-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="path;path
Also documents how to build on Linux.
llvm-svn: 171316
2012-12-31 19:34:21 +00:00
Chandler Carruth
e70a813b59
Don't mark variadic functions as always inline -- they cannot in fact be
...
inlined.
Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.
llvm-svn: 171276
2012-12-31 06:09:54 +00:00
Chandler Carruth
3036ab26e3
Add a simple .arcconfig to make using the 'arc' commandline tool and the
...
phabricator code review site easier with libc++.
llvm-svn: 171275
2012-12-31 05:59:45 +00:00
Howard Hinnant
a96d74585f
Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
...
llvm-svn: 171232
2012-12-29 17:45:42 +00:00
Howard Hinnant
bd037ab4ba
Saleem Abdulrasool: GCC complains about the template functions as potentially not being able to be
...
inlined. These do not need to be always-inlined for ABI stability because they are not exported beyond this source due to the unnamed namespace.
Also simplified use of the Wmissing-field-initializers pragma as was done for clang.
llvm-svn: 171202
2012-12-28 18:15:01 +00:00
Howard Hinnant
0933f5d358
Saleem Abdulrasool: Add entry to CREDITS.TXT.
...
llvm-svn: 171174
2012-12-27 23:26:52 +00:00
Howard Hinnant
6b0101acae
Saleem Abdulrasool: cleanup a few more compile warnings emitted by GCC.
...
llvm-svn: 171173
2012-12-27 23:24:31 +00:00
Howard Hinnant
80a11413bb
Saleem Abdulrasool: avoid hardcoding buffer lengths.
...
llvm-svn: 171169
2012-12-27 21:17:53 +00:00
Howard Hinnant
43d978e5c4
Saleem Abdulrasool: Silence warning and reduce unnecessary code in hash.cpp.
...
llvm-svn: 171167
2012-12-27 18:59:05 +00:00
Howard Hinnant
267e3e1eb8
Saleem Abdulrasool: This just rounds up a few compile warnings emitted by GCC (4.7.2).
...
llvm-svn: 171165
2012-12-27 18:46:00 +00:00
Chad Rosier
7f902715e8
Remove redundant inits. Patch by Eitan Adler.
...
llvm-svn: 170967
2012-12-22 00:12:05 +00:00
Howard Hinnant
d15de653f0
Test case for http://llvm.org/bugs/show_bug.cgi?id=14670 .
...
llvm-svn: 170706
2012-12-20 16:50:07 +00:00
Howard Hinnant
3b42bdd58a
Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670 .
...
llvm-svn: 170703
2012-12-20 15:40:28 +00:00
Richard Smith
e3fbbccc0f
Implement std::is_base_of for the case where we don't have a compiler
...
intrinsic. This relies upon the fact that overload resolution does not check
access and ambiguity for a derived-to-base conversion. This passes all
is_base_of tests in the test suite.
llvm-svn: 170662
2012-12-20 04:20:28 +00:00
Marshall Clow
36a60721ce
Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
...
llvm-svn: 170435
2012-12-18 16:46:30 +00:00
Howard Hinnant
3cea78ee68
Updated CREDITS.TXT
...
llvm-svn: 170062
2012-12-13 00:51:59 +00:00
Howard Hinnant
16694b5df5
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
llvm-svn: 170026
2012-12-12 21:14:28 +00:00
Howard Hinnant
9f4328b173
Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.
...
llvm-svn: 169686
2012-12-09 00:12:14 +00:00
Michael J. Spencer
299fc29a59
[CMake] Add support for selecting which c++ abi library to use.
...
llvm-svn: 169036
2012-11-30 21:02:29 +00:00
Richard Smith
e1f363c724
Remove 'noreturn' attribute from friend declaration. This attribute will be
...
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.
llvm-svn: 168853
2012-11-29 04:30:50 +00:00
Daniel Dunbar
7c4b853e74
tests/lit: Change test default parameters to assume local build.
...
- Also, support overriding them with lit parameters.
llvm-svn: 168749
2012-11-27 23:56:28 +00:00
Howard Hinnant
6852b55314
Fix type-o.
...
llvm-svn: 168715
2012-11-27 18:52:32 +00:00
Howard Hinnant
43a1f7b045
Remove by-chapter breakdown of what is implemented. The chart is now obsolete.
...
llvm-svn: 168713
2012-11-27 18:35:09 +00:00
Howard Hinnant
f8b24cf5f7
Dimitry Andric: When using libc++ headers on FreeBSD, in combination with -std=c++98,
...
-ansi or -std=c++03, the long long type is not supported. So in this
case, several functions and types, like lldiv_t, strtoll(), are not
declared.
llvm-svn: 168610
2012-11-26 21:18:17 +00:00
Howard Hinnant
dfdf5085df
istreambuf_iterator increment should call sbumpc instead of snextc. Patch
...
by Kimball Thurston. This fixes http://llvm.org/bugs/show_bug.cgi?id=14358 .
llvm-svn: 168209
2012-11-16 22:17:23 +00:00
Howard Hinnant
b5c63a2e07
Restrict optimized __pad_and_output implementation detail to desired releases.
...
llvm-svn: 167980
2012-11-14 21:17:15 +00:00
Marshall Clow
497d9d2671
Change C++0x references to C++11, Fixes bug #12745
...
llvm-svn: 167930
2012-11-14 16:31:15 +00:00
Howard Hinnant
119703f984
Dimitry Andric: Silence some miscellaneous warnings.
...
llvm-svn: 167493
2012-11-06 21:55:44 +00:00
Howard Hinnant
3e2740a36c
Dimitry Andric: Silence some warnings in <locale>.
...
llvm-svn: 167492
2012-11-06 21:48:33 +00:00
Howard Hinnant
a01739a03a
Enable the tuple interface of pair in C++03 mode.
...
llvm-svn: 167491
2012-11-06 21:42:45 +00:00
Howard Hinnant
1c8358c13c
Update instructions for building and using libc++ on Mac OS
...
llvm-svn: 167490
2012-11-06 21:31:37 +00:00
Howard Hinnant
cd47cbc7a4
Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
...
llvm-svn: 167486
2012-11-06 21:08:48 +00:00
Howard Hinnant
66e7ed959f
peek should set eofbit if sgetc() returns eof.
...
llvm-svn: 167238
2012-11-01 17:32:07 +00:00
Howard Hinnant
b304811686
Richard Smith: This fixes a problem in std::is_constructible for incomplete types, and those types with a user-defined operator,().
...
llvm-svn: 167233
2012-11-01 16:32:14 +00:00
Howard Hinnant
54d333a601
Rename uses of _ and __ because these are getting stepped on by macros from other system code.
...
llvm-svn: 167038
2012-10-30 19:06:59 +00:00