summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement LWG 2591 - Patch from K-BalloEric Fiselier2017-05-102-1/+5
| | | | llvm-svn: 302724
* XFAIL is_trivially_copyable test for compilers that don't implement Core 2094Eric Fiselier2017-05-101-1/+3
| | | | llvm-svn: 302723
* Fix enable_shared_from_this test in C++11Eric Fiselier2017-05-101-7/+6
| | | | llvm-svn: 302721
* Clean up LIT failure output by not showing the entire environmentEric Fiselier2017-05-101-28/+3
| | | | llvm-svn: 302713
* Update is_trivially_copyable tests with CWG 2094Billy Robert O'Neal III2017-05-101-4/+4
| | | | | | | | | Clang 5.0 implements these changes here: https://github.com/llvm-mirror/clang/commit/87cd035326a39523eeb1b295ad36cff337141ef9 MSVC++ will implement these changes in the first toolset update to 2017. Differential Revision: https://reviews.llvm.org/D33021 llvm-svn: 302710
* [libc++] Fix PR32979 - types with a private std::enable_shared_from_this ↵Eric Fiselier2017-05-102-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | base break shared_ptr Summary: This patch fixes bugs.llvm.org/PR32979. [util.smartptr.shared.const] says: > In the constructor definitions below, enables shared_from_this with p, for a pointer p of type Y*, means > that if Y has an unambiguous and accessible base class that is a specialization of enable_shared_from_- > this. This means that libc++ needs to respect the access specifier of the base class, and not attempt to construct and enabled_shared_from_this base if it is private. However access specifiers don't affect overload resolution so our current implementation will attempt to construct the private base. This patch uses SFINAE to correctly detect if the shared_ptr input has an accessible enable_shared_from_this base class. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33033 llvm-svn: 302709
* [test] support machinery changes for EDG & C1XX /ZaCasey Carter2017-05-106-9/+77
| | | | | | | | | | | | | | | | | | | | | This change works around a couple of bugs: 1. EDG doesn't like explicit constexpr in a derived class. This program: struct Base {}; struct Derived : Base { constexpr Derived() = default; }; triggers "error: defaulted default constructor cannot be constexpr." 2. C1XX with /Za has no idea which constructor needs to be valid for copy elision. The change also conditionally disables parts of the msvc_stdlib_force_include.hpp header that conflict with external configuration when _LIBCXX_IN_DEVCRT is defined. Differential Revision: https://reviews.llvm.org/D32778 llvm-svn: 302707
* Attempt to speculatively unbreak Apple build botsEric Fiselier2017-05-101-11/+1
| | | | llvm-svn: 302627
* Rename Appveyor install helper script.Eric Fiselier2017-05-102-1/+1
| | | | | | | | | I'm really lazy and the old name for the helper script killed 2 letter tab completion for the include directory. This patch renames it to avoid that problem and enable lazyness. llvm-svn: 302619
* Support using MinGW POSIX threads on WindowsEric Fiselier2017-05-101-1/+2
| | | | llvm-svn: 302617
* attempt to fix appveyor syntax errorEric Fiselier2017-05-101-1/+1
| | | | llvm-svn: 302616
* Add MinGW64 builder to Appveyor.Eric Fiselier2017-05-102-8/+24
| | | | | | | | With the amount of work happening on Windows we should have a MinGW bot to make sure we don't regress that functionality. Currently it doesn't build :-( llvm-svn: 302614
* Improve how LIT reports the added environment variablesEric Fiselier2017-05-101-1/+5
| | | | llvm-svn: 302607
* Attempt to unbreak Libc++ test configurationEric Fiselier2017-05-101-4/+1
| | | | llvm-svn: 302604
* Fix test runtime environment on WindowsEric Fiselier2017-05-091-1/+4
| | | | llvm-svn: 302602
* Fix misspelling of environment throughout libc++Eric Fiselier2017-05-094-5/+5
| | | | llvm-svn: 302600
* docs: Fix Sphinx detection with out-of-tree buildsTom Stellard2017-05-091-2/+2
| | | | | | Adapt to changes made in r302499. llvm-svn: 302517
* Fix Windows tests when __config_site is present.Ben Craig2017-05-091-1/+1
| | | | | | | | Previously, the force includes would complain about a missing _DEBUG symbol. Now we dump macros before adding the force includes to the command line. Now with proper newlines. llvm-svn: 302497
* Revert "Fix Windows tests when __config_site is present."Ben Craig2017-05-091-1113/+1113
| | | | | | It's 2017, and line endings are still an issue. llvm-svn: 302496
* Fix GCC 7 test failures.Eric Fiselier2017-05-0914-22/+32
| | | | | | | | | | | This patch fixes the test failures and unexpected passes that occur when testing against GCC 7. Specifically: * don't mark __gcd as always inline because it's a recursive function. GCC diagnoses this. * don't XFAIL the aligned allocation tests. GCC 7 supports them but not the -faligned-allocation option. * Work around gcc.gnu.org/PR78489 in variants constructors. llvm-svn: 302488
* Refactor <locale> RAII guards to aid upcoming Windows locale changes.Eric Fiselier2017-05-085-47/+78
| | | | | | | | | | | | | | | | | | | Previously <locale> used std::unique_ptr<remove_ptr<locale_t>, locale-mgmt-function> as a scope guard for (A) creating new locales, and (B) setting the thread specific locale in RAII safe manner. However using unique_ptr has some problems, first it requires that locale_t is a pointer type, which may not be the case (Windows will need a non-pointer locale_t type that emulates _locale_t). The second problem is that users of the guards had to supply the locale management function to the custom deleter at every call site. However these locale management functions don't exist natively Windows, making a good Windows implementation of locale more difficult. This patch creates distinct and simply RAII guards that replace unique_ptr. These guards handle calling the correct locale management function so that callers don't have too. This simplification will aid in upcoming Windows fixes. llvm-svn: 302474
* Fix possible loss of data warnings on amd64Billy Robert O'Neal III2017-05-081-8/+10
| | | | | | | | | | | | | In T_size_size.pass, there is an explicit template argument to std::min to ask for unsigned, to avoid type deduction errors. However, C1XX' warnings still hate this use, because a 64 bit value (a size_t) is being passed to a function accepting an unsigned (a 32 bit value). Instead, change the tests to pass around std::size_t instances, and explicitly narrow when constructing the string type under test. This also allows removal of explicit template arguments to std::min. llvm-svn: 302473
* Resolve integer overflow warnings in GCD and LCM testsBilly Robert O'Neal III2017-05-082-42/+52
| | | | | | | | | | | | | | | | | | | | | lcm.pass.cpp: 19: Update headers to that actually used in the test. 41: test0 was triggering narrowing warnings for all callers, because the inputs were always ints, but some of the explicit template arguments were smaller than that. Instead, have this function accept ints and static_cast explicitly to the types we want before calling std::lcm. 47: Replace unnecessary ternary. 55: Use foo_t instead of typename foo<>::type 111/116: intX_t were not std::qualified but only <cfoo> headers were included. 141: C1XX has a bug where it interprets 2147483648 as unsigned int. Then the negation trips "negation of unsigned value, result still unsigned" warnings. Perma-workaround this issue by saying INT_MIN, which better documents the intended behavior and avoids triggering warnings on C1XX. gcd.pass.cpp: Same changes as lcm.pass.cpp but for GCD. llvm-svn: 302472
* Fix Windows tests when __config_site is present.Ben Craig2017-05-081-1113/+1113
| | | | | | | Previously, the force includes would complain about a missing _DEBUG symbol. Now we dump macros before adding the force includes to the command line. llvm-svn: 302421
* Fix Windows locale detectionEric Fiselier2017-05-081-12/+14
| | | | llvm-svn: 302396
* Fix shared_mutex dll import errors on WindowsEric Fiselier2017-05-081-1/+1
| | | | llvm-svn: 302394
* [libc++] Implement exception_ptr on WindowsEric Fiselier2017-05-0816-38/+167
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC. The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well. Note there are still 2 outstanding exception_ptr/nested_exception test failures. * `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time. * `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion. This patch also gets most of the `<future>` tests passing as well. Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D32927 llvm-svn: 302393
* Fix DLL import/export on Win32 locale helpersEric Fiselier2017-05-081-3/+4
| | | | llvm-svn: 302391
* Fix DLL import for __time_get_c_storage member functions.Eric Fiselier2017-05-081-0/+16
| | | | llvm-svn: 302390
* Revert "Actually remove the MSVC STL when linking and testing libc++ on Windows"Eric Fiselier2017-05-071-5/+1
| | | | | | This reverts commit r302387. llvm-svn: 302389
* Actually remove the MSVC STL when linking and testing libc++ on WindowsEric Fiselier2017-05-071-1/+5
| | | | llvm-svn: 302387
* Temporarly XFAIL aligned new/delete tests on Windows.Eric Fiselier2017-05-078-2/+43
| | | | | | | | | | | | | Libc++ doesn't provide its own definitions of new/delete on Windows, instead using the versions provided by VCRuntime. However VCRuntime does not yet implement aligned new/delete so these tests fail. It might be possible for libc++ to provide its own definitions only for aligned new/delete as long as MSVC doesn't provide it. However before this can be done libc++ needs to figure out how to implement std::get_new_handler. llvm-svn: 302384
* Fix Windows test failures caused by identical temp file names.Eric Fiselier2017-05-074-8/+89
| | | | | | | | | | | | This patch fixes test failures that occur on Windows because the tests attempt to generate two distinct temp file names but get the same name both time. The fix for this is to create the first temp file before requesting a second temporary file name. This ensures that the second name will be unique. llvm-svn: 302382
* Accept Windows specific output in system error testsEric Fiselier2017-05-072-2/+2
| | | | llvm-svn: 302381
* Fix two test failures caused by Windows mangling of function types.Eric Fiselier2017-05-072-15/+21
| | | | | | | | | | | | On Windows the function template `template <class T> void test()` has the same mangled name when instantiated with the distinct types `void()` and `void() noexcept`. When this occurs Clang emits an error. This error was causing two type-traits tests to fail. However this can be worked around by using class templates instead of function templates, which is what this patch does to fix the errors. llvm-svn: 302380
* Ensure showbase does not overflow do_put buffersDimitry Andric2017-05-062-0/+101
| | | | | | | | | | | | | | | | | | | | | Summary: In https://bugs.freebsd.org/207918, Daniel McRobb describes how using std::showbase with ostreams can cause truncation of unsigned long long when output format is octal. In fact, this can even happen with unsigned int and unsigned long. To ensure this does not happen, add one additional character to the do_put buffers if std::showbase is on. Also add a test case. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D32670 llvm-svn: 302362
* Fix lgamma_r linking errors on Windows. It appears the normal lgamma ↵Eric Fiselier2017-05-061-4/+14
| | | | | | function is thread safe anyway llvm-svn: 302330
* [libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more ↵Stephan T. Lavavej2017-05-0526-20/+119
| | | | | | | | fine-grained manner. Fixes D32926. llvm-svn: 302325
* [libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant ↵Stephan T. Lavavej2017-05-051-2/+2
| | | | | | | | | | with another constant". The expressions `1 == 1` and `true` have the same type, value category, and value. Fixes D32924. llvm-svn: 302322
* [libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance ↵Stephan T. Lavavej2017-05-053-0/+54
| | | | | | | | | | | shouldn't be mandated". In C++17, these iterators are allowed but not required to inherit from the deprecated std::iterator base class. Fixes D32727. llvm-svn: 302318
* Mark test using <sys/time.h> as UNSUPPORTED on WindowsEric Fiselier2017-05-051-0/+3
| | | | llvm-svn: 302298
* Fix condition_variable::wait_until and wait_for on Windows.Eric Fiselier2017-05-051-1/+4
| | | | | | | | The ERROR_TIMEDOUT returned by the Windows API does not have the same value as ETIMEDOUT. This caused condition_variable to return timeouts as unknown errors. llvm-svn: 302297
* Fix detection for [[fallthrough]] with GCCEric Fiselier2017-05-051-1/+1
| | | | llvm-svn: 302285
* Fix remaining GCC 7 build warningsEric Fiselier2017-05-051-2/+2
| | | | llvm-svn: 302283
* Fix new warnings emitted by GCC 7Eric Fiselier2017-05-053-7/+14
| | | | llvm-svn: 302280
* Document XFAIL's with the relevent bug numberEric Fiselier2017-05-052-0/+4
| | | | llvm-svn: 302213
* Fix test failure with GCC 4.9Eric Fiselier2017-05-041-0/+4
| | | | llvm-svn: 302182
* Change Appveyor to download Clang from llvm.org instead of my private serverEric Fiselier2017-05-042-10/+6
| | | | llvm-svn: 302181
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-04174-126/+1060
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* Use lgamma_r instead of lgamma in binomial_distribution, because freakin' ↵Marshall Clow2017-05-041-4/+8
| | | | | | POSIX took a perfectly fine call and made it not thread safe. llvm-svn: 302168
OpenPOWER on IntegriCloud