Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-25 Thread JF Bastien via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264413: Implement is_always_lock_free (authored by jfb). Changed prior to commit: http://reviews.llvm.org/D17951?vs=51607&id=51638#toc Repository: rL LLVM http://reviews.llvm.org/D17951 Files: lib

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-24 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 51607. jfb added a comment. Herald added a subscriber: jfb. - Check feature test macro exists http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp Index: test/std/atomics/atomics.lockfree/isalways

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-24 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. http://reviews.llvm.org/D17951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-23 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +#if defined(__cpp_lib_atomic_is_always_lock_free) + static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0); +#endif EricWF wrote: > jfb wrote: > > I d

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-23 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 51473. jfb added a comment. - Add definition. http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp Index: test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp ==

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-23 Thread Eric Fiselier via cfe-commits
EricWF added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +#if defined(__cpp_lib_atomic_is_always_lock_free) + static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0); +#endif jfb wrote: > I don't think so:

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-23 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +#if defined(__cpp_lib_atomic_is_always_lock_free) + static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0); +#endif I don't think so: it's similar to

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-22 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 51346. jfb added a comment. - Define __cpp_lib_atomic_is_always_lock_free in libc++ http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp Index: test/std/atomics/atomics.lockfree/isalwayslockfree.p

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-22 Thread Eric Fiselier via cfe-commits
EricWF added a comment. Re-building clang now so I can test the most recent changes. Comment at: include/atomic:850 @@ +849,3 @@ +#if defined(__cpp_lib_atomic_is_always_lock_free) + static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0);

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-22 Thread JF Bastien via cfe-commits
jfb added a comment. As discussed in now-abandoned http://reviews.llvm.org/D17950 I'll implement everything in libc++. I just have to move the feature test macro to libc++. http://reviews.llvm.org/D17951 ___ cfe-commits mailing list cfe-commits@lis

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-20 Thread Ben Craig via cfe-commits
bcraig added a comment. Visual Studio has a flag, /Zc:wchar_t-, that turns wchar_t into a short. This flag is for people that need to maintain ABI compatibility with ancient Visual Studios (MSVC6? MSVC5?). It is definitely non-conformant, and many things support it poorly. I still have night

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D17951#376546, @bcraig wrote: > Visual Studio has a flag, /Zc:wchar_t-, that turns wchar_t into a short. > This flag is for people that need to maintain ABI compatibility with ancient > Visual Studios (MSVC6? MSVC5?). It is definitely non-con

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread Eric Fiselier via cfe-commits
EricWF added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_CHAR32_T_LOCK_FREE; +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_WCHAR_T_LOCK_FREE; +template <> _

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 50903. jfb added a comment. - Size is based on __a_ not _Tp - Check value is consistent with C macros http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp test/std/atomics/atomics.lockfree/lockfr

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread Eric Fiselier via cfe-commits
EricWF added a comment. @jfb: Actually I changed my mind about guarding the new tests. Can you move the new tests (other than the missing additions) to a new test file? Then add `// UNSUPPORTED: c++98, c++03, c++11, c++14` to the top of it? http://reviews.llvm.org/D17951 ___

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 50846. jfb added a comment. - Split up tests. http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp test/std/atomics/atomics.lockfree/lockfree.pass.cpp Index: test/std/atomics/atomics.lockfree/lo

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb added a comment. In http://reviews.llvm.org/D17951#376546, @bcraig wrote: > Visual Studio has a flag, /Zc:wchar_t-, that turns wchar_t into a short. > This flag is for people that need to maintain ABI compatibility with ancient > Visual Studios (MSVC6? MSVC5?). It is definitely non-confor

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: include/atomic:900 @@ +899,3 @@ +# if defined(_LIBCPP_LOCK_FREE_IS_SIZE_BASED) + static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_always_lock_free; +# else Actually, this should be based on `sizeof(__a_)` and *n

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_CHAR32_T_LOCK_FREE; +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_WCHAR_T_LOCK_FREE; +template <> _LIB

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_CHAR32_T_LOCK_FREE; +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_WCHAR_T_LOCK_FREE; +template <> _LIB

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 51049. jfb added a comment. - Use __atomic_always_lock_free instead http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp Index: test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-18 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. Comment at: include/atomic:859 @@ +858,3 @@ +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_CHAR32_T_LOCK_FREE; +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_WCHAR_T_LOCK_FREE; +template

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-18 Thread Eric Fiselier via cfe-commits
EricWF added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_CHAR32_T_LOCK_FREE; +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_WCHAR_T_LOCK_FREE; +template <> _

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-07 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: include/atomic:840 @@ +839,3 @@ +#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE +#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE + Moving these from the bottom of the file since I need them.

[PATCH] D17951: Implement is_always_lock_free

2016-03-07 Thread JF Bastien via cfe-commits
jfb created this revision. jfb added reviewers: mclow.lists, rsmith. jfb added a subscriber: cfe-commits. This was voted into C++17 at last week's Jacksonville meeting. The final P0152R1 paper will be in the upcoming post-Jacksonville mailing, and is also available here: http://jfbastien.githu