Commit Graph

1583 Commits

Author SHA1 Message Date
Marshall Clow
bb9902ec97 K-ballo pointed out *another* mistype in my change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217936 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-17 01:58:15 +00:00
Marshall Clow
d402a4da6b Fix for mismatch to handle evil iterators which overload operator comma
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 20:40:05 +00:00
Marshall Clow
270f8e01e8 Create a 'comma_iterator' class that overloads operator, and asserts when it's called. Add tests to mismatch to make sure it can't be blindsided by such an evil iterator. More tests for other algorithms forthcoming. Thanks to STL for pointing this out at CppCon and Yakov Galka for opening LWG issue #2133
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217902 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 20:38:11 +00:00
Marshall Clow
4413ab09d5 Fix a bug in the move-assigment operator for basic_stringbuf. Thanks to Johnathan Wakeley for the bug report
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217894 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 18:57:52 +00:00
Marshall Clow
86d311c5f3 Thanks to K-ballo for noting a second incorrect noexcept clause in tuple - and suggesting a more correct way to write the first
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217884 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 17:08:21 +00:00
Marshall Clow
12929a957b Fix a bad noexcept clause in tuple's move constructor
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217878 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 15:36:14 +00:00
Marshall Clow
d1fae17224 Forgot 'const' on my last checkin
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217877 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 15:33:53 +00:00
Marshall Clow
546eca8dc6 Some of the synopsis was left out of these headers, and the copy construction/assignment should have been marked as deleted. Done. No functionality change, because the base class (base_ios) was marked as non-copyable already.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217876 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-16 15:27:01 +00:00
Dan Albert
7ba3c57565 PR20546: Fix tests for compare_exchange_weak.
These calls are allowed to fail spuriously.

29.6.5.25:

    Remark: A weak compare-and-exchange operation may fail spuriously.
    That is, even when the contents of memory referred to by expected
    and object are equal, it may return false and store back to expected
    the same memory contents that were originally there. [ Note: This
    spurious failure enables implementation of compare and-exchange on a
    broader class of machines, e.g., load-locked store-conditional
    machines. A consequence of spurious failure is that nearly all uses
    of weak compare-and-exchange will be in a loop.

To fix this, we replace any assert() that expects
std::atomic::compare_exchange_weak() to return true with a loop. If the
call does not return true within N runs (with N currently equal to 10),
then the test fails.

http://llvm.org/bugs/show_bug.cgi?id=20546


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217319 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-06 20:38:25 +00:00
Jonathan Roelofs
baed05dd37 Address some post-commit review comments on r217261
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217276 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-05 20:28:44 +00:00
Jonathan Roelofs
8d86b2e686 Allow libc++ to be built on systems without POSIX threads
If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.

http://reviews.llvm.org/D3969


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217271 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-05 19:45:05 +00:00
Jonathan Roelofs
d634a2c404 Bugfix: allow additional_features to be empty
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217268 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-05 19:03:46 +00:00
Jonathan Roelofs
217bdc189a Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on available_features
http://reviews.llvm.org/D5214


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217261 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-05 17:21:57 +00:00
Viktor Kutuzov
60a74bd69d Define ELAST in libcxx's config header on FreeBSD
Differential Revision: http://reviews.llvm.org/D5165


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217146 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-04 13:25:46 +00:00
Marshall Clow
26f472d1dd Make the ASAN RAII object a nop when building w/o ASAN
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217082 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 21:37:43 +00:00
Jonathan Roelofs
0f4ca8b340 Detection for _LIBCPP_HAS_NO_MONOTONIC_CLOCK caused several more build breakages
Remove it for now. This flag can be set in build scripts instead.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217061 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 18:48:28 +00:00
Alexey Volkov
5907f03123 Allow libc++ to be built with GCC 5.0 compiler
Differential Revision: http://reviews.llvm.org/D5169


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217038 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 14:30:39 +00:00
Justin Bogner
464da3b76c test: Make it possible to opt in to use_clang_verify per test
This modifies the use_clang_verify parameter I added in r217009 to
only apply to tests that specifically ask for it via // USE_VERIFY.
This allows us to incrementally convert tests, but start enjoying the
benefits right away.

Suggested by Eric Fiselier in code review.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217017 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 06:01:52 +00:00
Eric Fiselier
438d2cb25d Fix buffer overflow issue in valarray test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217012 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 05:47:35 +00:00
Justin Bogner
837cfe50fe test: Allow using clang -verify for failures rather than exit 1
Currently, failure tests work by checking that compilation exits 1.
This can lead to tests that fail for the wrong reason, so it'd be
preferable to convert them to check for specific errors.

This adds use_clang_verify parameter that runs failure tests using
clang's -verify flag. I'll convert some tests in subsequent commits,
and once all of the tests are converted we should key this on whether
cxx_under_test is clang.

I've also converted one of the unique.ptr tests, since it's the one
that motivated the idea of using clang -verify when possible in the
review of r216317.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217009 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 04:32:08 +00:00
Jonathan Roelofs
fc685481dc Fix yet another aspect of the build breakage caused by r216949
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217001 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 00:29:02 +00:00
Jonathan Roelofs
cb093955e9 Fix comment that was obsoleted by r216949
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216999 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:52:46 +00:00
Jonathan Roelofs
7d7b9944b2 Fix build breakage introduced in r216949
The bug shows up on systems that `#define _POSIX_CLOCK_MONOTONIC 0` to indicate
that users of CLOCK_MONOTONIC must check sysconf at runtime.

See: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/unistd.h.html


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216997 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:49:15 +00:00
Kostya Serebryany
497f912ab2 [asan] Make vector asan annotations exception-friendly
Fix vector asan annotations with RAII.
Add a test.
Also, remove one dead function.
Review: http://reviews.llvm.org/D4170



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216995 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 23:43:38 +00:00
Jonathan Roelofs
50508334bf Silence _LIBCPP_ELAST porting warning on __APPLE__
This fixes a warning accidentally introduced in r216943.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:09:50 +00:00
Jonathan Roelofs
0991323677 Don't #define _LIBCPP_HAS_NO_MONOTONIC_CLOCK on __APPLE__
This fixes PR20839, which was a bug in r216949.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216975 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:56:01 +00:00
Jonathan Roelofs
c5780651c3 Partially address a FIXME in steady_clock::now()
http://reviews.llvm.org/D4045


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216949 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 21:14:38 +00:00
Jonathan Roelofs
b9420936a4 Newlib names ELAST differently than linux
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216943 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 20:34:23 +00:00
Marshall Clow
e33e03e558 Fix PR#20834 - 'is_trivially_destructible yeilds wrong answer for arrays of unknown bound' Thanks to K-ballo for the bug report. Update a few of the other tests while we're here, and fix a typo in a test name.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216909 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 16:19:38 +00:00
Eric Fiselier
b26c966174 Mark test types for <atomic> nothrow default constructible. Patch from Steve MacKenzie.
The way the standard currently specifies the default constructor for atomic<T>
requires T to be nothrow default constructible. This patch makes our test types
meet this requirement.

Note: The nothrow default constructible requirment is subject to the outcome of
LWG issue 1265.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216561 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-27 17:00:11 +00:00
Jonathan Roelofs
9dc353cf11 Rename arguments in include/cmath to work around Newlib macro implementation using these particular names
http://reviews.llvm.org/D5080


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216548 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-27 14:05:20 +00:00
Jonathan Roelofs
116c819cc2 Revert r216497: "[libcxx] Fix ctype_byname<wchar_t>::do_is() mask checking."
After discussing implementing more tests for this with @danalbert & @mclow, I
realized this change is not correct.

The C++ standard requires do_is() to behave as if it were a loop that checked
is(). Furthermore, it requires is() to check "The first form returns the result
of the expression (M & m) != 0; i.e., true if the character has the
characteristics specified"... which the reverted patch definitely does not
conform to. Even further, furthermore, this requires that ctype's mask be an
actual bitmask, unlike what android and newlib provide for _ctype_.

Fixing the original bug that instigated this patch remains TBD.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216508 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-27 00:39:47 +00:00
Jonathan Roelofs
32050e1e69 [libcxx] Fix ctype_byname<wchar_t>::do_is() mask checking.
This patch: http://reviews.llvm.org/D5081
Original patch: http://reviews.llvm.org/D5071 (from @danalbert)


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-26 22:29:00 +00:00
Marshall Clow
861f1e95fd Replace 'noexcept' with '_NOEXCEPT' in <shared_mutex>. This allows us to build the dylib with MSVC, which doesn't support noexcept (sheesh\!). Thanks to K-ballo for the report.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216384 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-25 14:53:16 +00:00
Marshall Clow
4de32048f5 Fix bug 20740 - std::set/std::map don't support heterogeneous lookup for count(). Thanks to Jim Porter for the bug report
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216353 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-24 23:54:16 +00:00
Eric Fiselier
a564dc53dd Fix assignments that should be comparisons x3
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216318 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-23 07:55:29 +00:00
Eric Fiselier
69e7c05783 Add return statement to a test class's assignment operator. Defect found by Coverity Scan.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216317 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-23 06:36:11 +00:00
Eric Fiselier
1070916643 [libcxx] Add --show-unsupported and --show-xfail to check-libcxx's default LIT args.
Summary:
In order to gather more information about testsuite results these flags should be added to LIT's default args.
These new switches were recently added to LIT. It been more than two weeks since both switches were added.
I think its time we add these to our LIT flags.


Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5037

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216315 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-23 04:33:20 +00:00
Eric Fiselier
ae6e58c561 Fix handling of format strings to work with python 2.6
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216314 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-23 04:02:21 +00:00
Dan Albert
2c26213103 Refactor lit.cfg.
The purely imperative format of the configuration performed in lit.cfg
was making merge conflicts with changes I have for Android an
unbelievable pain in the ass. I've moved all of the configuration into a
Configuration class, with each piece of configuration happening in a
different method. This way I can avoid merge conflicts, and any new
features that get added (as have been done with the sanitizers, the -std
flag, etc.) can be easily applied to Android as well.

Reviewers: mclow.lists, EricWF

Reviewed By: EricWF

Differential Revision: http://reviews.llvm.org/D4952


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216196 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 17:30:44 +00:00
Eric Fiselier
4f26672043 Add self to credits
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216154 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 04:21:43 +00:00
Eric Fiselier
501561910a Mark some localization time tests as XFAIL on linux.
This marks some of the localization test XFAIL on linux.
There has been some discussion on D4861 about doing this.
Please let me know if any of these tests for you on linux.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216151 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 02:38:21 +00:00
Eric Fiselier
51642a4e81 Mark some localization monetary tests as XFAIL on linux.
This marks some of the localization test XFAIL on linux.
There has been some discussion on D4861 about doing this.
Please let me know if any of these tests for you on linux.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 02:22:54 +00:00
Eric Fiselier
f523693f3f Mark localization ctype tests as XFAIL on linux.
This marks some of the localization test XFAIL on linux.
There has been some discussion on D4861 about doing this.
Please let me know if any of these tests for you on linux.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216148 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21 02:03:01 +00:00
Eric Fiselier
682132b4cc fix missing include for ::close in platform_support.h
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215998 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 17:52:40 +00:00
Eric Fiselier
bc4bcf051b Add extra test case for PR20345. Should have been commited with r215984
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215985 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 16:33:05 +00:00
Eric Fiselier
63648cffc0 Fix is_member_function_pointer does not account for ellipsis. PR20345. Patch from Agustin Berge.
I reviewed the patch and added the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215984 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 16:31:47 +00:00
Jonathan Roelofs
6f10d47bbc Give libcxx tests temporary filenames that are actually unique.
This fixes a race condition on temp file name creation.

http://reviews.llvm.org/D4962


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 13:56:56 +00:00
Eric Fiselier
6661ad10f2 Add standard version to lit.cfg's available features
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215885 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 07:05:40 +00:00
Eric Fiselier
978faa00df Update linux test results
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215884 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 06:53:30 +00:00