From 895c4f3ec7de5d3c4a2df53d84f9834d9fd5cd9c Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Sat, 26 May 2018 00:13:53 +0000 Subject: [PATCH] Fix GCC handling of ATOMIC_VAR_INIT r333325 from D47225 added warning checks, and the test was written to be C++11 correct by using ATOMIC_VAR_INIT (note that the committee fixed that recently...). It seems like GCC can't handle ATOMIC_VAR_INIT well because it generates 'type 'std::atomic' cannot be initialized with an initializer list' on bot libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03. Drop the ATOMIC_VAR_INITs since they weren't required to test the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333327 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/libcxx/atomics/diagnose_nonnull.fail.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/libcxx/atomics/diagnose_nonnull.fail.cpp b/test/libcxx/atomics/diagnose_nonnull.fail.cpp index a1f6332ac..98d299bf8 100644 --- a/test/libcxx/atomics/diagnose_nonnull.fail.cpp +++ b/test/libcxx/atomics/diagnose_nonnull.fail.cpp @@ -17,8 +17,8 @@ #include int main() { - std::atomic ai = ATOMIC_VAR_INIT(0); - volatile std::atomic vai = ATOMIC_VAR_INIT(0); + std::atomic ai; + volatile std::atomic vai; int i = 42; atomic_is_lock_free((const volatile std::atomic*)0); // expected-error {{null passed to a callee that requires a non-null argument}}