Commit Graph

1631 Commits

Author SHA1 Message Date
Nico Weber 28d692d30e Mark module atomic as cplusplus11.
With clang, the header atomic requires __has_feature(cxx_atomic), which is only
true in c++11 mode. Because of this, when using modules in c++98 with libc++
compilation of the std module would fail without this change, PR21002.

(With gcc, only gcc4.7+ is needed, no c++11. But gcc doesn't have modules yet,
and the module.modulemap language can't express things like "this is only
required if the compiler is clang". If gcc gets module support, we'd probably
have a module.modulemap file for each compiler that libc++ supports?)

llvm-svn: 218372
2014-09-24 04:44:54 +00:00
Eric Fiselier 2b232cf06c [libcxx] Fix installation of ABI headers. Fixes PR20936
Summary:
I changed the build so that each ABI header gets its own install rule. This gives us the flexibility to install different headers in different directories. 
This also fixes the problem where libstdc++ bits/<header>'s were not being installed under a bits directory.

Test Plan: I tested this patch on linux against libstdc++ and libcxxabi.

Reviewers: danalbert, mclow.lists, jroelofs

Reviewed By: jroelofs

Subscribers: jhunold, cfe-commits

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

llvm-svn: 218309
2014-09-23 14:42:28 +00:00
Marshall Clow 0f79772ecc Fix some type-traits (is_assignable, etc) dealing with classes that take non-const references as 'right hand side'. Add tests. Fixes PR# 20836
llvm-svn: 218286
2014-09-22 23:58:00 +00:00
Jonathan Roelofs 4f1561a5dd Support newlib as libc++'s C library [locale part]
http://reviews.llvm.org/D5385

llvm-svn: 218144
2014-09-19 20:09:12 +00:00
Marshall Clow 3c71bff667 Fix PR#20843: binomial_distribution<unsigned> is broken. Add test to ensure that signed and unsigned verstions produce the same sequence.
llvm-svn: 217976
2014-09-17 18:33:58 +00:00
Dan Albert 353f358d24 Fix char_traits functions for GCC compatibility.
GCC 4.9 fails to inline these functions at -O1 because they are used
indirectly. Declare them as inline instead of always_inline. Discussion
in GCC bugreport: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63220

llvm-svn: 217961
2014-09-17 16:34:29 +00:00
Marshall Clow 29298664d9 Add include of <cassert> for the operator comma
llvm-svn: 217938
2014-09-17 04:09:35 +00:00
Marshall Clow 85d5e6f25b K-ballo pointed out *another* mistype in my change
llvm-svn: 217936
2014-09-17 01:58:15 +00:00
Marshall Clow bd7c7b5551 Fix for mismatch to handle evil iterators which overload operator comma
llvm-svn: 217903
2014-09-16 20:40:05 +00:00
Marshall Clow f1e473bad9 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
llvm-svn: 217902
2014-09-16 20:38:11 +00:00
Marshall Clow d1b5078579 Fix a bug in the move-assigment operator for basic_stringbuf. Thanks to Johnathan Wakeley for the bug report
llvm-svn: 217894
2014-09-16 18:57:52 +00:00
Marshall Clow 10a65e2ee1 Thanks to K-ballo for noting a second incorrect noexcept clause in tuple - and suggesting a more correct way to write the first
llvm-svn: 217884
2014-09-16 17:08:21 +00:00
Marshall Clow 3175f49d33 Fix a bad noexcept clause in tuple's move constructor
llvm-svn: 217878
2014-09-16 15:36:14 +00:00
Marshall Clow 30d0c1ab5f Forgot 'const' on my last checkin
llvm-svn: 217877
2014-09-16 15:33:53 +00:00
Marshall Clow f45b237c51 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.
llvm-svn: 217876
2014-09-16 15:27:01 +00:00
Dan Albert 0bb696800f 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

llvm-svn: 217319
2014-09-06 20:38:25 +00:00
Jonathan Roelofs afe6794bc2 Address some post-commit review comments on r217261
llvm-svn: 217276
2014-09-05 20:28:44 +00:00
Jonathan Roelofs b3fcc67f8f 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

llvm-svn: 217271
2014-09-05 19:45:05 +00:00
Jonathan Roelofs b352db7f57 Bugfix: allow additional_features to be empty
llvm-svn: 217268
2014-09-05 19:03:46 +00:00
Jonathan Roelofs 3547c5441e Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on available_features
http://reviews.llvm.org/D5214

llvm-svn: 217261
2014-09-05 17:21:57 +00:00
Viktor Kutuzov d3b10d9daf Define ELAST in libcxx's config header on FreeBSD
Differential Revision: http://reviews.llvm.org/D5165

llvm-svn: 217146
2014-09-04 13:25:46 +00:00
Marshall Clow b67bc4ea0d Make the ASAN RAII object a nop when building w/o ASAN
llvm-svn: 217082
2014-09-03 21:37:43 +00:00
Jonathan Roelofs 3bb7b558df 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.

llvm-svn: 217061
2014-09-03 18:48:28 +00:00
Alexey Volkov e46ca71f0b Allow libc++ to be built with GCC 5.0 compiler
Differential Revision: http://reviews.llvm.org/D5169

llvm-svn: 217038
2014-09-03 14:30:39 +00:00
Justin Bogner 2cfd1fed21 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.

llvm-svn: 217017
2014-09-03 06:01:52 +00:00
Eric Fiselier 99ff9c7bb2 Fix buffer overflow issue in valarray test
llvm-svn: 217012
2014-09-03 05:47:35 +00:00
Justin Bogner 33a2a2ed1a 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.

llvm-svn: 217009
2014-09-03 04:32:08 +00:00
Jonathan Roelofs 112237b476 Fix yet another aspect of the build breakage caused by r216949
llvm-svn: 217001
2014-09-03 00:29:02 +00:00
Jonathan Roelofs ffa0895c3b Fix comment that was obsoleted by r216949
llvm-svn: 216999
2014-09-02 23:52:46 +00:00
Jonathan Roelofs bb8fd4ccdb 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
llvm-svn: 216997
2014-09-02 23:49:15 +00:00
Kostya Serebryany 3f0e834842 [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

llvm-svn: 216995
2014-09-02 23:43:38 +00:00
Jonathan Roelofs 6ca513c913 Silence _LIBCPP_ELAST porting warning on __APPLE__
This fixes a warning accidentally introduced in r216943.

llvm-svn: 216977
2014-09-02 22:09:50 +00:00
Jonathan Roelofs f4bc679cad Don't #define _LIBCPP_HAS_NO_MONOTONIC_CLOCK on __APPLE__
This fixes PR20839, which was a bug in r216949.

llvm-svn: 216975
2014-09-02 21:56:01 +00:00
Jonathan Roelofs c59e585126 Partially address a FIXME in steady_clock::now()
http://reviews.llvm.org/D4045

llvm-svn: 216949
2014-09-02 21:14:38 +00:00
Jonathan Roelofs a409d59cf5 Newlib names ELAST differently than linux
llvm-svn: 216943
2014-09-02 20:34:23 +00:00
Marshall Clow bbb3a7f51c 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.
llvm-svn: 216909
2014-09-02 16:19:38 +00:00
Eric Fiselier 7d1c2d8878 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.

llvm-svn: 216561
2014-08-27 17:00:11 +00:00
Jonathan Roelofs 5bf9c8a2e8 Rename arguments in include/cmath to work around Newlib macro implementation using these particular names
http://reviews.llvm.org/D5080

llvm-svn: 216548
2014-08-27 14:05:20 +00:00
Jonathan Roelofs 16bb38907c 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.

llvm-svn: 216508
2014-08-27 00:39:47 +00:00
Jonathan Roelofs 67d629889e [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)

llvm-svn: 216497
2014-08-26 22:29:00 +00:00
Marshall Clow d08f0d9c05 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.
llvm-svn: 216384
2014-08-25 14:53:16 +00:00
Marshall Clow 0aacbc92df Fix bug 20740 - std::set/std::map don't support heterogeneous lookup for count(). Thanks to Jim Porter for the bug report
llvm-svn: 216353
2014-08-24 23:54:16 +00:00
Eric Fiselier 1f7bd5f24d Fix assignments that should be comparisons x3
llvm-svn: 216318
2014-08-23 07:55:29 +00:00
Eric Fiselier 67c94867ba Add return statement to a test class's assignment operator. Defect found by Coverity Scan.
llvm-svn: 216317
2014-08-23 06:36:11 +00:00
Eric Fiselier 916223b61f [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

llvm-svn: 216315
2014-08-23 04:33:20 +00:00
Eric Fiselier 561dfb57fc Fix handling of format strings to work with python 2.6
llvm-svn: 216314
2014-08-23 04:02:21 +00:00
Dan Albert ae2526b4cd 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

llvm-svn: 216196
2014-08-21 17:30:44 +00:00
Eric Fiselier 700c58b1c5 Add self to credits
llvm-svn: 216154
2014-08-21 04:21:43 +00:00
Eric Fiselier 43e866a136 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.

llvm-svn: 216151
2014-08-21 02:38:21 +00:00
Eric Fiselier df5efb9a51 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.

llvm-svn: 216150
2014-08-21 02:22:54 +00:00
Eric Fiselier 65b31a903b 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.

llvm-svn: 216148
2014-08-21 02:03:01 +00:00
Eric Fiselier ab79a7a98b fix missing include for ::close in platform_support.h
llvm-svn: 215998
2014-08-19 17:52:40 +00:00
Eric Fiselier ca39572270 Add extra test case for PR20345. Should have been commited with r215984
llvm-svn: 215985
2014-08-19 16:33:05 +00:00
Eric Fiselier 0acf0d2701 Fix is_member_function_pointer does not account for ellipsis. PR20345. Patch from Agustin Berge.
I reviewed the patch and added the test cases.

llvm-svn: 215984
2014-08-19 16:31:47 +00:00
Jonathan Roelofs 1542a60c0b Give libcxx tests temporary filenames that are actually unique.
This fixes a race condition on temp file name creation.

http://reviews.llvm.org/D4962

llvm-svn: 215977
2014-08-19 13:56:56 +00:00
Eric Fiselier 59174710d5 Add standard version to lit.cfg's available features
llvm-svn: 215885
2014-08-18 07:05:40 +00:00
Eric Fiselier 8f2a62ed6b Update linux test results
llvm-svn: 215884
2014-08-18 06:53:30 +00:00
Eric Fiselier 339bdc3be9 [libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES.
Summary:
This patch adds support for // UNSUPPORTED: feature. If an excluded feature is found in the list of available features then the test is marked unsupported.

I hope to use this to mark test unsupported if the fail with msan on asan. As well as tests that fail in particular standard modes.


Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215883
2014-08-18 06:43:06 +00:00
Eric Fiselier cd6ac3a3a7 [libcxx] Add list of currently known buildbots to libc++ homepage
Summary:
Instead of having to update test results for different platforms it would be helpful to just supply links to buildbots that build+test libcxx.
For the FreeBSD bots Pawel Worach gave me the OK to link to them.

Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215882
2014-08-18 05:25:04 +00:00
Eric Fiselier 3faba8d464 Mark cuchar tests as always xfail since we don't provide the header'
llvm-svn: 215873
2014-08-18 05:09:51 +00:00
Eric Fiselier 0058c80cc7 [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree
Summary:
This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. 

This patch does the following things:
1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it.
2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake.
3. Add config.llvm_use_sanitizer to lit.site.cfg.in
4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg.

Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. 

Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215872
2014-08-18 05:03:46 +00:00
Eric Fiselier 1b44db22c6 [libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormat
Summary:
This patch does two things:
CMake Update:
  - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x.
  - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default.
  - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y
  - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11.

Lit Update:
  - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std.
  - Remove mentions of has_cxx0X configuration option.
  - Check for `--param std=X' passed to lit on the command line.
  - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg.



Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits

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

llvm-svn: 215802
2014-08-16 01:35:36 +00:00
Eric Fiselier 983484fb11 Readding FreeBSD support to lit.cfg. Patch from Pawel Worach.
Pawel has been using this patch on his buildbots for a while. This should
allow the testsuite to run on FreeBSD with libcxxrt.

llvm-svn: 215787
2014-08-15 23:24:00 +00:00
Jonathan Roelofs f11170406e Tame a few enum size tests when using -fshort-enums on ARM.
llvm-svn: 215769
2014-08-15 21:34:52 +00:00
Eric Fiselier db36dc23e4 Revert get testsuite running on FreeBSD.
There is a similar patch up for review. I'll submit my changes via that.

llvm-svn: 215750
2014-08-15 18:49:28 +00:00
Eric Fiselier 1a0b735340 Get testsuite running on FreeBSD.
Add initial support for using LIT to run the tests on FreeBSD. 
More work may need to be done to add support for FreeBSD but this is a
good initial step.

llvm-svn: 215742
2014-08-15 18:00:47 +00:00
Justin Bogner d2308ea5fd Revert "Turn off extern templates for most uses."
Turning off explicit template instantiation leads to a pretty
significant build time and code size cost. We're better off dealing
with ABI incompatibility issues that come up in a less heavy handed
way.

This reverts commit r189610.

llvm-svn: 215740
2014-08-15 17:58:56 +00:00
Eric Fiselier d237ac80f9 Fix incorrect locale requirements in tests
llvm-svn: 215694
2014-08-15 05:02:05 +00:00
Eric Fiselier e3981b8fac Add bare_allocator archetype that implements the minimal possible allocator interface.
llvm-svn: 215691
2014-08-15 04:15:41 +00:00
Hans Wennborg 4714826262 [libc++] Fix the CMake build on Mac when setting MACOSX_DEPLOYMENT_TARGET=10.6
The build file was trying to use LIBCXX_VERSION, which isn't set
anywhere, and also forgot to split the 'compile_flags' list.

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

llvm-svn: 215463
2014-08-12 17:32:07 +00:00
Eric Fiselier 90e0867742 Change two tests to be less dependant on locales.
This patch removes the use of the "%c" specifier for getting/setting times.
The semantics of this specifier differ between linux and Mac. I don't believe
the use of this specifier was important to the test.

The following tests now pass on linux.
test/input.output/iostream.format/ext.manip/get_time.pass.cpp
test/input.output/iostream.format/ext.manip/put_time.pass.cpp

llvm-svn: 215417
2014-08-12 00:48:56 +00:00
Eric Fiselier 981a64c380 Add return statement to slice_array and mask_array assignment. Closes PR20614.
This patch just adds the required return statements to slice_array::operator=
and mask_array::operator=.

Tests were added to check that the return value is the same as the object assigned
to.

llvm-svn: 215414
2014-08-12 00:06:58 +00:00
Dan Albert ec4de787e2 Update libc++ docs to include instructions for LIT.
Okay, so this actually does more than just that. I've rearranged most of
the information on the page to try to make it more helpful and flow
better.  Essentially, the differences between Mac and Linux, the various
ABI libraries, and in-tree versus out-of-tree builds were cluttering
things. To clean up, I've done the following:

 * Only describe the cmake process. buildit doesn't work out of the box
   on Linux, and we need to stop having duplicates for every process.
 * Use libc++abi for the default instructions. This works on the major
   platforms.
 * Describe both in-tree and out-of-tree builds. Previously it wasn't
   clear that in-tree builds were even possible for libc++.
 * Separate the documentation about using libc++ from that about
   building and testing libc++.

llvm-svn: 215358
2014-08-11 15:12:46 +00:00
Eric Fiselier c1bd9197eb NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove external include guards.
Things done in this patch:

1. Make __debug include __config since it uses macros from it.

2. The current method of defining _LIBCPP_ASSERT is prone to redefinitions. Move
the null _LIBCPP_ASSERT definition into the __debug header to prevent this.

3. Remove external <__debug> include gaurds. <__debug> guards almost all of its
contents internally. There is no reason to be doing it externally.

This patch should not change any functionality.

llvm-svn: 215332
2014-08-10 23:53:08 +00:00
Eric Fiselier 399e99ae75 fix stdio.h test to reflect removal of ::gets in c++14
llvm-svn: 215329
2014-08-10 22:39:11 +00:00
Eric Fiselier 04c39ece80 NFC. Remove trailing whitespace and tabs.
llvm-svn: 215326
2014-08-10 20:56:31 +00:00
Dan Albert 502dca7bb0 Emulate clang atomic built-ins on gcc > 4.7
gcc 4.7 and above has atomic built-ins which slightly different APIs
from those provided by clang. Add proxy functions that wrap the gcc
built-ins to produce a symbol that is API equivalent to the clang
built-ins. This allows libc++'s atomic library to be used with gcc-4.7
and newer.

Patch contributed by Albert Wong.

llvm-svn: 215305
2014-08-09 23:51:51 +00:00
David Blaikie c6dbc22b9b Revert "Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state."
Premature commit due to misreading CR feedback.

This reverts commit r215301.

llvm-svn: 215302
2014-08-09 22:42:19 +00:00
David Blaikie f63d5fa236 Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state.
Some tests were constructing it with 0, so use -1 as the invalid state
instead.

Reviewers: Marshall Clow

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

llvm-svn: 215301
2014-08-09 22:35:47 +00:00
Eric Fiselier f5f5862a27 fix copy and pasted comment in test
llvm-svn: 215276
2014-08-09 02:43:16 +00:00
Eric Fiselier 95b0d0f888 Mark math.h and cmath tests as xfail on linux.
These tests were marked as failing because the libc implementation does not
use the proper return type on certain math functions. There is other weirdness
that prevents us from defining our own version of these functions.

The failing tests in cmake were separated into their own files so that the rest
failures in the rest of the cmath tests were not hidden.

This was not done for the math.h test since we don't actually supply math.h

llvm-svn: 215275
2014-08-09 02:39:03 +00:00
Marshall Clow 99d2df956d Apply a similar fix to <forward_list> as I did for <list> in r215210. Again, thanks to Ion Gaztañaga for noticing this problem w.r.t LWG#526
llvm-svn: 215213
2014-08-08 15:58:00 +00:00
Marshall Clow ced70066c2 While reading LWG#526, Ion Gaztañaga noticed that libc++ didn't correctly handle list::remove(const value_type &x), if x was an element of the list. Added a test for this, and a fix. Thanks to Ion for the report.
llvm-svn: 215210
2014-08-08 15:35:52 +00:00
Viktor Kutuzov 88d6dc962a Fix re-building in-tree libc++ against in-tree libc++abi
Differential Revision: http://reviews.llvm.org/D4805

llvm-svn: 215186
2014-08-08 06:53:30 +00:00
Marshall Clow 28d65da618 dit pointed out on IRC that '__i = _VSTD::next(__i)' was a very long-winded way of writing '++__i'. Since I hate being thought of as long-winded (this checkin comment notwithstanding), I fixed it. No functionality change.
llvm-svn: 214834
2014-08-05 01:34:12 +00:00
Dan Albert 48e28e09bb Fix typo.
llvm-svn: 214768
2014-08-04 20:27:45 +00:00
Marshall Clow 89872e99a5 Fix a problem with reference_wrapper in C++03 that was causing counting predicates to fail. Add a test to make sure it works. However, most of the reference_wrapper tests still fail in C++03 mode, due to a lack of decltype. No change there.
llvm-svn: 214760
2014-08-04 19:20:17 +00:00
Dan Albert a85b27f6f7 Add locales to available_features for tests.
Linux has a lot of failures caused by not having support for certain
locales. Since these come out as a lot of noise in the test results,
have lit.cfg detect the presence of the various locales used in the
tests and add them to config.available_features as locale.LOCALE_NAME.

This patch also adds REQUIRES: locale.REQUIRED_LOCALE to every test that
I saw failing in this manner. We probably need to add more for all the
tests requiring en_US.UTF-8, but we can do that on an as-needed basis.

One thing that concerns me is how many tests get skipped because of
missing locales (especially in regex/). We should make a point of
splitting up any tests that test default behavior _and_ behavior under a
given locale so that we aren't losing coverage for default behavior.

llvm-svn: 214753
2014-08-04 18:44:48 +00:00
Marshall Clow 90ba0533cd Fix PR#202520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm
llvm-svn: 214736
2014-08-04 17:32:25 +00:00
Dan Albert b9dbbba6cb Obey LLVM_LIBDIR_SUFFIX.
llvm-svn: 214726
2014-08-04 16:13:32 +00:00
Eric Fiselier 58fab766e6 Adding ABI information to linux test results
llvm-svn: 214484
2014-08-01 06:30:18 +00:00
Eric Fiselier ae9acb8273 Update information about compiler used during linux tests and reformat run information.
llvm-svn: 214483
2014-08-01 06:27:40 +00:00
Eric Fiselier 9cd8ed4e23 Update linux test results file
llvm-svn: 214474
2014-08-01 01:59:09 +00:00
Eric Fiselier 993dfb1eef Change lit.cfg to allow whitespace before comments
llvm-svn: 214454
2014-07-31 22:56:52 +00:00
Dan Albert ea32c105a6 Make Android's ctype_base::mask unsigned.
Keeping the regex code sane is much easier if we match the other
platforms and use an unsigned mask.

llvm-svn: 214442
2014-07-31 21:04:08 +00:00
Eric Fiselier 6d3bd8f7ec [libcxx] Remove use of default function template parameters in type traits. Fixes DR20484
Summary: This patch moves the SFINAE for __is_destructor_welformed out of the function template parameters. type_traits must compile in c++03 mode since it is included in c++03 headers. 

Test Plan: No tests have been added.

Reviewers: danalbert, mclow.lists

Reviewed By: danalbert

Subscribers: K-ballo, cfe-commits

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

llvm-svn: 214422
2014-07-31 19:09:26 +00:00
Marshall Clow 2628dbb214 Add test cases for creating atomic types for trivially copyable types.
llvm-svn: 214406
2014-07-31 15:20:48 +00:00
Marshall Clow 6a577a819f Fix numeric_limits<XXX>::is_modulo for signed arithmetic types. We were reporting true, for all arithmetic types, which is incorrect. Fix the tests which were wrong, too. This fixes PR#20158.
llvm-svn: 214371
2014-07-31 01:18:05 +00:00
Marshall Clow 81f051cd10 std::once_flag was forward declared with _LIBCPP_TYPE_VIS decoration, and the defined with _LIBCPP_TYPE_VIS_ONLY decoration. Make them match
llvm-svn: 214219
2014-07-29 21:05:31 +00:00
Dan Albert 15c010a37e Base regex code on char_class_type.
__get_classname() and __bracket_expression were assuming that
char_class_type was ctype_base::mask rather than using
regex_traits<_CharT>::char_class_type.

This change allows char_class_type to be defined to something other than
ctype_base::mask so that the implementation will still work for
platforms with an 8-bit ctype mask (such as Android and OpenBSD).

llvm-svn: 214201
2014-07-29 19:23:39 +00:00