summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/atomics
Commit message (Collapse)AuthorAgeFilesLines
* Implement is_always_lock_freeJF Bastien2016-03-251-0/+101
| | | | | | | | | | | | | | | | | | Summary: This was voted into C++17 at the Jacksonville meeting. The final P0152R1 paper will be in the upcoming post-Jacksonville mailing, and is also available here: http://jfbastien.github.io/papers/P0152R1.html Reviewers: mclow.lists, rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17951 llvm-svn: 264413
* Missing ATOMIC_*_LOCK_FREE testsJF Bastien2016-03-181-0/+8
| | | | | | Forked from D17951, these tests should have been there but weren't. llvm-svn: 263798
* Add missing license headersEric Fiselier2016-01-191-0/+9
| | | | llvm-svn: 258196
* Fix various GCC mis-configurations for newer versions.Eric Fiselier2015-12-151-3/+3
| | | | | | | | | | | | 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
* Misc drive-by cleanups. NFCJonathan Roelofs2015-08-242-41/+0
| | | | | | http://reviews.llvm.org/D12294 llvm-svn: 245876
* [libcxx] Allow use of <atomic> in C++03. Try 3.Eric Fiselier2015-08-1930-675/+268
| | | | | | | | | | | | | | | | | | | | | | | Summary: After putting this question up on cfe-dev I have decided that it would be best to allow the use of `<atomic>` in C++03. Although static initialization is a concern the syntax required to get it is C++11 only. Meaning that C++11 constant static initialization cannot silently break in C++03, it will always cause a syntax error. Furthermore `ATOMIC_VAR_INIT` and `ATOMIC_FLAG_INIT` remain defined in C++03 even though they cannot be used because C++03 usages will cause better error messages. The main change in this patch is to replace `__has_feature(cxx_atomic)`, which only returns true when C++ >= 11, to `__has_extension(c_atomic)` which returns true whenever clang supports the required atomic builtins. This patch adds the following macros: * `_LIBCPP_HAS_C_ATOMIC_IMP` - Defined on clang versions which provide the C `_Atomic` keyword. * `_LIBCPP_HAS_GCC_ATOMIC_IMP` - Defined on GCC > 4.7. We must use the fallback atomic implementation. * `_LIBCPP_HAS_NO_ATOMIC_HEADER` - Defined when it is not safe to include `<atomic>`. `_LIBCPP_HAS_C_ATOMIC_IMP` and `_LIBCPP_HAS_GCC_ATOMIC_IMP` are mutually exclusive, only one should be defined. If neither is defined then `<atomic>` is not implemented and including `<atomic>` will issue an error. Reviewers: chandlerc, jroelofs, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11555 llvm-svn: 245463
* Mark this test as XFAIL with older compilers, since they hit PR18097Justin Bogner2015-07-221-0/+4
| | | | llvm-svn: 242967
* Fix unused variable warnings in atomic testsEric Fiselier2015-07-185-5/+7
| | | | llvm-svn: 242625
* Fix PR24114 - std::atomic for non-Clang is not a literal typeEric Fiselier2015-07-141-0/+56
| | | | | | Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t. llvm-svn: 242172
* Fix uninitialized values and bad enum conversions found by UBSAN.Eric Fiselier2015-05-193-16/+16
| | | | llvm-svn: 237738
* Move a test to the new tests directory.Dan Albert2015-01-061-0/+43
| | | | | | | I had written the patch that added this test before the tests were moved into tests/std, so the test ended up in the wrong directory. llvm-svn: 225300
* Move test into test/std subdirectory.Eric Fiselier2014-12-2056-0/+3488
llvm-svn: 224658
OpenPOWER on IntegriCloud