Marshall Clow
fc940277cb
Fix PR#31454 - 'basic_string<T>::push_back() crashes if sizeof(T)>sizeof(long long)'. We were mishandling the small-string optimization calculations for very large 'characters'. This may be an ABI change (change the size of) strings of very large 'characters', but since they never worked, I'm not too concerned.
...
llvm-svn: 324531
2018-02-07 21:30:17 +00:00
Marshall Clow
936a2fd4b4
Ooops. I checked in a test for a bug I haven't fixed yet. Temporrarily commented it out.
...
llvm-svn: 319693
2017-12-04 20:46:38 +00:00
Marshall Clow
800259c98d
Implement P0457R2: 'String Prefix and Suffix Checking' for c++2a
...
llvm-svn: 319687
2017-12-04 20:11:38 +00:00
Stephan T. Lavavej
4159db7698
[libcxx] [test] Untabify, NFC.
...
llvm-svn: 309464
2017-07-29 00:55:10 +00:00
Eric Fiselier
e84fcb5f3d
Fix PR32642 - string::insert and string::append don't work with move_iterator.
...
llvm-svn: 300397
2017-04-15 06:49:02 +00:00
Stephan T. Lavavej
d72ece6462
[libcxx] [test] D27027: Strip trailing whitespace.
...
llvm-svn: 287829
2016-11-23 22:03:28 +00:00
Roger Ferrer Ibanez
8a915ed644
Protect exceptional paths under libcpp-no-exceptions
...
These tests are of the form
try {
action-that-may-throw
assert(!exceptional-condition)
assert(some-other-facts)
} catch (relevant-exception) {
assert(exceptional-condition)
}
Under libcpp-no-exceptions there is still value in verifying
some-other-facts while avoiding the exceptional case. So for these tests
just conditionally check some-other-facts if exceptional-condition is
false. When exception are supported make sure that a true
exceptional-condition throws an exception
Differential Revision: https://reviews.llvm.org/D26136
llvm-svn: 285697
2016-11-01 15:46:16 +00:00
Eric Fiselier
009fb08d14
Fix shadow warnings in string_view tests. Patch from STL@microsoft.com
...
llvm-svn: 285011
2016-10-24 20:10:00 +00:00
Marshall Clow
67be6ff839
Add another append test for basic_string
...
llvm-svn: 283331
2016-10-05 15:47:13 +00:00
Marshall Clow
54f0981ebd
Implement proposed resolution for LWG#2758. Reviewed as D24446. Normally, I would wait for these to be voted upon at a committee meeting (November), but the current draft standard is broken, and this should fix it. (And if it doesn't, we want to know about it soonest)
...
llvm-svn: 282342
2016-09-24 22:45:42 +00:00
Marshall Clow
a77bb8ef34
Fix PR#30303 - no matching function for call to '__ptr_in_range'
...
llvm-svn: 280779
2016-09-07 03:32:06 +00:00
Marshall Clow
7e1a23001d
Fix Bug 30240 - std::string: append(first, last) error when aliasing. Add test cases for append/insert/assign/replace while we're at it, and fix a similar bug in insert.
...
llvm-svn: 280643
2016-09-05 01:54:30 +00:00
Marshall Clow
053d81ceeb
Implement std::string_view as described in http://wg21.link/P0254R1 . Reviewed as https://reviews.llvm.org/D21459
...
llvm-svn: 276238
2016-07-21 05:31:24 +00:00
Eric Fiselier
1f4231f8cf
Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros
...
llvm-svn: 267947
2016-04-28 22:28:23 +00:00
Marshall Clow
e612a8877a
More string fixes for noexcept cases. Apparently I didn't get them all in r258281.
...
llvm-svn: 258291
2016-01-20 05:41:24 +00:00
Marshall Clow
9d10d27c67
Fix up the tests I added for string exceptions to be skipped when exceptions are disabled
...
llvm-svn: 258279
2016-01-20 03:19:15 +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
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
Eric Fiselier
5a83710e37
Move test into test/std subdirectory.
...
llvm-svn: 224658
2014-12-20 01:40:03 +00:00