summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2019-01-09 23:20:24 +0000
committerJF Bastien <jfbastien@apple.com>2019-01-09 23:20:24 +0000
commita131ebfcaf83dc9459976fe42e8070827e721dc8 (patch)
tree4afd548c9392079743339ef37c86dd979a55d242
parent668faeab19b6827e5755b747b2b84b6a882a336b (diff)
downloadexternal_libcxx-a131ebfcaf83dc9459976fe42e8070827e721dc8.tar.gz
external_libcxx-a131ebfcaf83dc9459976fe42e8070827e721dc8.tar.bz2
external_libcxx-a131ebfcaf83dc9459976fe42e8070827e721dc8.zip
[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] git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@350772 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
index 7a8d4c1f4..43436e65a 100644
--- a/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
+++ b/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(); }