diff options
author | JF Bastien <jfbastien@apple.com> | 2019-01-09 23:20:24 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2019-01-09 23:20:24 +0000 |
commit | fc2b52a93eedf774629ab5a58133236a39f77f41 (patch) | |
tree | e3214539ff65ea396e8c1714daf2802048d10ae1 /libcxx/test | |
parent | ac70c021c1d352e93a43a500c7ab4471cc377249 (diff) |
[NFC] Always lock free test: add indirection
I have a big patch coming up, and this indirection is required to avoid hitting the following after my big change:
error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp index 7a8d4c1f4a6..43436e65a90 100644 --- a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp @@ -59,7 +59,7 @@ void checkLongLongTypes() { static_assert((0 != ATOMIC_LLONG_LOCK_FREE) == ExpectLockFree, ""); } -int main() +void run() { // structs and unions can't be defined in the template invocation. // Work around this with a typedef. @@ -134,3 +134,5 @@ int main() static_assert(std::atomic<void*>::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE)); static_assert(std::atomic<std::nullptr_t>::is_always_lock_free == (2 == ATOMIC_POINTER_LOCK_FREE)); } + +int main() { run(); } |