Commit Graph

2349 Commits

Author SHA1 Message Date
Eric Fiselier 51b9de4c7c Fix type in tuple test. Sorry for the noise
llvm-svn: 255944
2015-12-18 01:04:36 +00:00
Eric Fiselier 545b8861fc [libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
Review: http://reviews.llvm.org/D14839
llvm-svn: 255941
2015-12-18 00:36:55 +00:00
Eric Fiselier 6627c70df7 Add CMake option LIBCXX_CONFIGURE_IDE to allow for other IDE's.
CLion needs similar configuration changes as MSVC_IDE and XCODE.

llvm-svn: 255851
2015-12-16 23:41:05 +00:00
Eric Fiselier e2e332a50e Make noexcept specifications on __hash_table definitions match their declarations.
llvm-svn: 255738
2015-12-16 00:53:04 +00:00
Eric Fiselier af5b54a249 Workaround nasty GCC bug that caused testsuite to hang
llvm-svn: 255734
2015-12-16 00:35:45 +00:00
Eric Fiselier 8087ddd1e6 Remove unused _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS macro
llvm-svn: 255686
2015-12-15 22:19:03 +00:00
Eric Fiselier 8dcfcf79ab [libcxx] Enable noexcept for GCC 4.6 and greater
Summary:
This patch allows GCC 4.6 and above to use `noexcept` as opposed to `throw()`. 

Is it an ABI safe change to suddenly switch on `noexcept`? I imagine it must be because it's disabled in w/ clang in C++03 but not C++11.


Reviewers: danalbert, jroelofs, mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 255683
2015-12-15 22:16:47 +00:00
Eric Fiselier fd10d98ed0 Mark declarations of externally instantiated functions as inline so GCC doesn't complain.
llvm-svn: 255599
2015-12-15 01:41:41 +00:00
Eric Fiselier 831c112954 Fix various GCC mis-configurations for newer versions.
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:

1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.

llvm-svn: 255585
2015-12-15 00:32:21 +00:00
Eric Fiselier 08ce75b6c6 Update paths in libc++ build instructions. Patch from Jonathan Anderson.
llvm-svn: 255561
2015-12-14 22:26:28 +00:00
Eric Fiselier d5262627eb Update how libc++/libc++abi link the tests. Follow up on r255559.
llvm-svn: 255560
2015-12-14 22:24:19 +00:00
Marshall Clow 6e07ccdfe1 K-Ballo pointed out a mistake in the add_lvalue_ref tests I checked in; now more of them are passing. Thanks
llvm-svn: 255519
2015-12-14 18:11:51 +00:00
Marshall Clow 25090a91bb Missed this on the previous (255517) commit
llvm-svn: 255518
2015-12-14 18:02:23 +00:00
Marshall Clow 94b5bc4263 Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
llvm-svn: 255517
2015-12-14 18:01:56 +00:00
Marshall Clow 161eae2daa Add add_lvalue_ref tests for a few function types, with a note why not more
llvm-svn: 255513
2015-12-14 17:34:03 +00:00
Evgeniy Stepanov 2abfe726b2 Replace cmake check for printf with a check for fopen.
Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255187
2015-12-10 00:45:18 +00:00
Eric Fiselier 6a8678edee Remove redundant _LIBCPP_ALWAYS_INLINE attribute from __convert_to_integral overloads
llvm-svn: 255185
2015-12-10 00:43:37 +00:00
Evgeniy Stepanov 26ba3870bf Remove visibility attributes from out-of-class method definitions in iostreams.
No point in pretending that these methods are hidden - they are
actually exported from libc++.so. Extern template declarations make
them part of libc++ ABI.

This patch does not change libc++.so export list (at least on Linux).

llvm-svn: 255177
2015-12-09 23:42:30 +00:00
Evgeniy Stepanov 02b8e94943 Add 3 more missing inline/visibility attributes.
These are the cases when an out-of-class definition of a method is
marked _LIBCPP_INLINE_VISIBILITY, but the in-class declaration is
not. This will start failing when (or if) we switch to
attribute((internal_linkage)).

llvm-svn: 255166
2015-12-09 22:32:36 +00:00
Eric Fiselier fff5ec035b Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.
llvm-svn: 255162
2015-12-09 22:03:06 +00:00
Marshall Clow 146c640e81 Cleaned up the intro for the TS status page; really need much more info here
llvm-svn: 254971
2015-12-08 00:08:23 +00:00
Chris Bieneman a1b79aeab9 [CMake] If you're not installing the libcxx library, exclude it from the "all" target so it doesn't get built when you run "ninja install"
This is just a build dependency optimization. Running check-libcxx will still build libcxx and function as expected, it just removes libcxx from the all build and install targets.

llvm-svn: 254628
2015-12-03 18:52:54 +00:00
Marshall Clow b8427293df Last bit of P0006; mark it as complete
llvm-svn: 254290
2015-11-30 05:39:30 +00:00
Marshall Clow 12dff9e66a Fix bugs in alignment_of_v, etc. Re-enable the newly added tests
llvm-svn: 254289
2015-11-30 05:20:00 +00:00
Marshall Clow 00b6b01592 Temporarily disable new tests while I figure out what's going on
llvm-svn: 254288
2015-11-30 05:15:10 +00:00
Marshall Clow c8f3816e63 Fix bad macros
llvm-svn: 254287
2015-11-30 05:10:10 +00:00
Marshall Clow 825a9edb2e Missing file from last commit
llvm-svn: 254286
2015-11-30 05:04:48 +00:00
Marshall Clow 4ddfaea773 Implement more of P0006; Type Traits Variable Templates. <ratio>
llvm-svn: 254285
2015-11-30 05:04:22 +00:00
Marshall Clow 803a8bb105 Fix bad macros in tests
llvm-svn: 254284
2015-11-30 05:03:35 +00:00
Marshall Clow e12a536d76 Implement more of P0006; Type Traits Variable Templates.
llvm-svn: 254283
2015-11-30 04:30:02 +00:00
Marshall Clow 94f89aeec5 Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this.
llvm-svn: 254119
2015-11-26 01:24:04 +00:00
Marshall Clow 9d73243bc1 Silence a -Wmissing-braces warning in the tests; mbstate_t is defined differently on different C libraries.
llvm-svn: 254050
2015-11-25 01:06:36 +00:00
Marshall Clow e0312a3047 Remove undefined behavior from tests; specifically, ensure that the value type of the allocators match the value type of the containers
llvm-svn: 254030
2015-11-24 22:10:51 +00:00
Vasileios Kalintiris 08010b5a0c Use libcxx's default rune table with the Musl C library.
Summary:
Also, there are no exported character type tables from Musl so we have to
Fallback to the standard functions. This reduces the number of libcxx's
test-suite failures down to ~130 for MIPS. Most of the remaining failures
come from the atomics (due to the lack of 8-byte atomic-ops in MIPS32) and
thread tests.

Reviewers: mclow.lists, EricWF, dalias, jroelofs

Subscribers: tberghammer, danalbert, srhines, cfe-commits

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

llvm-svn: 253972
2015-11-24 10:24:54 +00:00
Marshall Clow bfb3f2bf7d Fix some mistakes in the <utility> and <tuple> synopses. No functional change. Thannks to K-ballo for the patch
llvm-svn: 253593
2015-11-19 19:45:29 +00:00
Marshall Clow 5fcc8169ed Fix some mistakes in the <array> synopsis. No functional change. Thanks to K-ballo for the patch
llvm-svn: 253592
2015-11-19 19:41:04 +00:00
Eric Fiselier 1f6e22d1cc Fix bad variable name. project_root -> project_obj_root
llvm-svn: 253382
2015-11-17 21:48:29 +00:00
Marshall Clow 1867554cc6 Add tests for the extended integer types - as required by LWG#2119
llvm-svn: 253376
2015-11-17 21:04:24 +00:00
Marshall Clow dbd2d32892 Implement P0007: Constant View: A proposal for a std::as_const helper function template.
llvm-svn: 253274
2015-11-17 00:08:08 +00:00
Marshall Clow 28ec78e7a5 Fix compile error in test. Can't use `operator[]` for multimap.
llvm-svn: 253271
2015-11-16 23:40:27 +00:00
Marshall Clow b90e350017 More tests for LWG#2156
llvm-svn: 253257
2015-11-16 22:18:36 +00:00
Marshall Clow a9197737f9 LWG#2156 loosened the requirements on unordered containers 'rehash' calls. Add tests to make sure we meet these requirements. Since we met the stricter ones, no code change needed to meet the looser ones.
llvm-svn: 253223
2015-11-16 16:42:16 +00:00
Marshall Clow dd1b261f3a Implement P0013R1: Logical Operator Type Traits. Make a hidden implementation (__and_, __or_, and __not_) so that we can use them elsewhere in non-C++17 code - for example, in the LFTS
llvm-svn: 253215
2015-11-16 15:54:13 +00:00
Marshall Clow 7d5264fa44 Mark P0013 as 'in progress'
llvm-svn: 253212
2015-11-16 15:05:09 +00:00
Marshall Clow 183c010c9a Implement P0074: Making owner_less more flexible
llvm-svn: 252905
2015-11-12 15:56:44 +00:00
Asiri Rathnayake ea4282d336 [libcxx] Fixup a few fumbles in the initial no-exceptions XFAILs list.
The initial buildbot run found a few missing bits in the initial XFAIL list
for the no-exceptions libc++ variant. These discrepancies are as follows:

[1] Following two tests need XFAILs on the no-exceptions library variant.
My local runs had these two disabled for other reasons (unsupported):

  - localization/locales/locale/locale.cons/char_pointer.pass.cpp
  - numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp

[2] These three does not need XFAILs, they were failing on my local runs for
other reasons:

  - depr/depr.c.headers/uchar_h.pass.cpp
  - input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
  - .../category.collate/locale.collate.byname/transform.pass.cpp

(these are failing on my box for the default build as well)

The current patch fixes both the cases above. Additionally, I've run the
following scan to make sure I've covered all the cases:

> grep ' catch \| try \| throw ' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \
  uniq > 1.txt
> grep 'libcpp-no-exceptions' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \
  uniq > 2.txt
> diff 1.txt 2.txt

This showed up a few extra interesting cases:

[3] These two tests do not use try/catch/throw statements, but they fail at
runtime. Need to be investigated, I've left the XFAILs in.

  - std/thread/futures/futures.shared_future/dtor.pass.cpp
  - std/thread/futures/futures.unique_future/dtor.pass.cpp

[4] These tests use a macro named TEST_HAS_NO_EXCEPTIONS to conditionally
exclude try/catch/throw statements when running without exceptions. I'm not
entirely sure why this was needed (AFAIK, we didn't have a no-exceptions
library build before). The macro's defintion is quite similar to that of
_LIBCPP_NO_EXCEPTIONS. I will investigate if this can be reused for my test
fixes or if it should be replaced with _LIBCPP_NO_EXCEPTIONS.

  - std/experimental/any/*

Change-Id: I9ad1e0edd78f305406eaa0ab148b1ab693f7e26a
llvm-svn: 252870
2015-11-12 10:41:57 +00:00
Marshall Clow d1180f4abc Fix typo I just introduced.
llvm-svn: 252614
2015-11-10 16:10:17 +00:00
Marshall Clow 41277d179f std:: qualify ptrdiff_t in the test. Thanks to Walter for the catch
llvm-svn: 252613
2015-11-10 16:04:13 +00:00
Marshall Clow d17405fe9c Walter pointed out some missing includes in the tests. Fixing the includes uncovered a couple bugs in the _v type traits. Fixed those, too
llvm-svn: 252612
2015-11-10 15:48:23 +00:00
Marshall Clow bfba968360 Explicitly #include <utility> so that we get std::move. Thanks to Walter for the bug report.
llvm-svn: 252610
2015-11-10 15:22:08 +00:00