| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
https://reviews.llvm.org/D61014.
llvm-svn: 359184
|
| |
|
|
|
|
|
|
|
| |
Clang recently added __builtin_is_constant_evaluated() and GCC 9.0
has it as well.
This patch adds support for it in libc++.
llvm-svn: 359119
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
All overloads of `::abs` and `std::abs` must be present in both `<cmath>` and `<cstdlib>`. This is problematic to implement because C defines `fabs` in `math.h` and `labs` in `stdlib.h`. This introduces a circular dependency between the two headers.
This patch implements that requirement by moving `abs` into `math.h` and making `stdlib.h` include `math.h`. In order to get the underlying C declarations from the "real" `stdlib.h` inside our `math.h` we need some trickery. Specifically we need to make `stdlib.h` include next itself.
Suggestions for a cleaner implementation are welcome.
Reviewers: mclow.lists, ldionne
Reviewed By: ldionne
Subscribers: krytarowski, fedor.sergeev, dexonsmith, jdoerfert, jsji, libcxx-commits
Differential Revision: https://reviews.llvm.org/D60097
llvm-svn: 359020
|
| |
|
|
|
|
| |
suppress warnings generated by [[nodiscard]]."
llvm-svn: 356635
|
| |
|
|
|
|
|
|
| |
generated by [[nodiscard]].
This allows these tests to pass when compiled by MSVC++.
llvm-svn: 356632
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Freestanding is *weird*. The standard allows it to differ in a bunch of odd
manners from regular C++, and the committee would like to improve that
situation. I'd like to make libc++ behave better with what freestanding should
be, so that it can be a tool we use in improving the standard. To do that we
need to try stuff out, both with "freestanding the language mode" and
"freestanding the library subset".
Let's start with the super basic: run the libc++ tests in freestanding, using
clang as the compiler, and see what works. The easiest hack to do this:
In utils/libcxx/test/config.py add:
self.cxx.compile_flags += ['-ffreestanding']
Run the tests and they all fail.
Why? Because in freestanding `main` isn't special. This "not special" property
has two effects: main doesn't get mangled, and main isn't allowed to omit its
`return` statement. The first means main gets mangled and the linker can't
create a valid executable for us to test. The second means we spew out warnings
(ew) and the compiler doesn't insert the `return` we omitted, and main just
falls of the end and does whatever undefined behavior (if you're luck, ud2
leading to non-zero return code).
Let's start my work with the basics. This patch changes all libc++ tests to
declare `main` as `int main(int, char**` so it mangles consistently (enabling us
to declare another `extern "C"` main for freestanding which calls the mangled
one), and adds `return 0;` to all places where it was missing. This touches 6124
files, and I apologize.
The former was done with The Magic Of Sed.
The later was done with a (not quite correct but decent) clang tool:
https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed
This works for most tests, though I did have to adjust a few places when e.g.
the test runs with `-x c`, macros are used for main (such as for the filesystem
tests), etc.
Once this is in we can create a freestanding bot which will prevent further
regressions. After that, we can start the real work of supporting C++
freestanding fairly well in libc++.
<rdar://problem/47754795>
Reviewers: ldionne, mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits
Differential Revision: https://reviews.llvm.org/D57624
llvm-svn: 353086
|
| |
|
|
|
|
|
| |
It doesn't make a lot of sense to keep it with the tests,
deep into the test suite directonies.
llvm-svn: 352970
|
| |
|
|
|
|
|
| |
Reviewed as https://reviews.llvm.org/D56503.
Thanks to Andrey Maksimov for the patch.
llvm-svn: 351847
|
| |
|
|
|
|
|
|
|
|
| |
D56445 bumped the minimum Mac OS X version required for aligned
allocation from 10.13 to 10.14. This caused libc++ tests depending
on the old value to break.
This patch updates the XFAILs for those tests to include 10.13.
llvm-svn: 351670
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r351625.
That fix was incomplete. I'm reverting so I can commit a complete fix
in a single revision.
llvm-svn: 351669
|
| |
|
|
| |
llvm-svn: 351650
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351648
|
| |
|
|
|
|
|
|
|
|
| |
D56445 bumped the minimum Mac OS X version required for aligned
allocation from 10.13 to 10.14. This caused libc++ tests depending
on the old value to break.
This patch updates the XFAILs for those tests to include 10.13.
llvm-svn: 351625
|
| |
|
|
| |
llvm-svn: 351299
|
| |
|
|
| |
llvm-svn: 351291
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements all the feature test macros libc++ currently supports, as specified by the standard or cppreference prior to C++2a.
The tests and `<version>` header are generated using a script. The script contains a table of each feature test macro, the headers it should be accessible from, and its values of each dialect of C++.
When a new feature test macro is added or needed, the table should be updated and the script re-run.
Reviewers: mclow.lists, jfb, serge-sans-paille
Reviewed By: mclow.lists
Subscribers: arphaman, jfb, ldionne, libcxx-commits
Differential Revision: https://reviews.llvm.org/D56750
llvm-svn: 351286
|
| |
|
|
|
|
| |
Submitted upstream as https://reviews.llvm.org/D53763.
llvm-svn: 351148
|
| |
|
|
|
|
| |
the appropriate tests. No actual tests yet, so NFC.
llvm-svn: 350535
|
| |
|
|
| |
llvm-svn: 349373
|
| |
|
|
| |
llvm-svn: 349364
|
| |
|
|
|
|
| |
Fundamentals 2 for C++20. Reviewed as https://reviews.llvm.org/D55532
llvm-svn: 349178
|
| |
|
|
| |
llvm-svn: 348829
|
| |
|
|
| |
llvm-svn: 348828
|
| |
|
|
|
|
|
| |
It is now equivalent to the 'availability' LIT feature, so there's no
reason to keep both.
llvm-svn: 348653
|
| |
|
|
|
|
| |
Some people are still running the test suite using AppleClang 9.
llvm-svn: 348507
|
| |
|
|
|
|
| |
numeric_limits<char8_t> is valid and sane. (second try)
llvm-svn: 347930
|
| |
|
|
| |
llvm-svn: 347908
|
| |
|
|
|
|
| |
numeric_limits<char8_t> is valid and sane.
llvm-svn: 347904
|
| |
|
|
|
|
|
|
|
|
| |
In r339743, I marked several aligned allocation tests as downright
unsupported on macosx in an attempt to unbreak the build. It turns
out that marking them as unuspported whenever we're on OS X is way
too coarse grained. This commit marks the tests as XFAIL with more
granularity.
llvm-svn: 347585
|
| |
|
|
|
|
|
| |
The '-faligned-allocation' flag uses a feature with the same name (with a
leading dash).
llvm-svn: 347367
|
| |
|
|
| |
llvm-svn: 346826
|
| |
|
|
| |
llvm-svn: 344951
|
| |
|
|
| |
llvm-svn: 344950
|
| |
|
|
|
|
| |
The test is trying to avoid saying aligned_alloc on Windows' UCRT, which does not (and can not) implement aligned_alloc. However, it's testing for c1xx, meaning clang on Windows will fail this test when using the UCRT.
llvm-svn: 344829
|
| |
|
|
| |
llvm-svn: 343432
|
| |
|
|
|
|
| |
feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955
llvm-svn: 342073
|
| |
|
|
|
|
| |
underlying abi library on some Mac OS versions does not support the plural uncaught_exceptions, so libc++ emulates it from the singlar; this means it will only return 0 or 1.
llvm-svn: 342063
|
| |
|
|
|
|
| |
don't have it. Reviewed as https://reviews.llvm.org/D50799
llvm-svn: 339816
|
| |
|
|
|
|
| |
since those calls were introduced in C++11. They're already guarded by an ifdef in the code, so this is a 'belt-and-suspenders' change.
llvm-svn: 339804
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Since r338934, Clang emits an error when aligned allocation functions are
used in conjunction with a system libc++ dylib that does not support those
functions. This causes some tests to fail when testing against older libc++
dylibs. This commit marks those tests as UNSUPPORTED, and also documents the
various reasons for the tests being unsupported.
Reviewers: vsapsai, EricWF
Subscribers: christof, dexonsmith, cfe-commits, mclow.lists, EricWF
Differential Revision: https://reviews.llvm.org/D50341
llvm-svn: 339743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Those tests are breaking the test bots. A Bugzilla has been filed to
make sure those tests are re-enabled: https://bugs.llvm.org/show_bug.cgi?id=38572
Reviewers: mclow.lists, EricWF
Subscribers: krytarowski, christof, dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D50748
llvm-svn: 339742
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
These #includes are quite important, since otherwise any
#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
checks are always false, and so we don't actually test for C11 support
in the standard library.
Reviewers: mclow.lists, EricWF
Subscribers: christof, dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D50674
llvm-svn: 339675
|
| |
|
|
|
|
| |
underlying C library supports it
llvm-svn: 338457
|
| |
|
|
|
|
| |
from C11. Part of P0063
llvm-svn: 338454
|
| |
|
|
|
|
| |
later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet.
llvm-svn: 338419
|
| |
|
|
| |
llvm-svn: 334676
|
| |
|
|
|
|
| |
this. Thanks to Peter Klotz for calling my attention to this.
llvm-svn: 333467
|
| |
|
|
|
|
| |
test/std almost always uses spaces; now it is entirely tab-free.
llvm-svn: 329978
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this patch adds the <compare> header and implements all of it
except for [comp.alg].
As I understand it, the header is needed by the compiler in
when implementing the semantics of operator<=>. For that reason
I feel it's important to land this header early, despite
all compilers lacking support.
llvm-svn: 329460
|
| |
|
|
| |
llvm-svn: 329075
|