diff options
author | JF Bastien <jfbastien@apple.com> | 2018-05-26 00:13:53 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2018-05-26 00:13:53 +0000 |
commit | 925faf274c16eada7496f0c76cc50d1293328a70 (patch) | |
tree | c5f09ef20d55e948ca17a27cbda9c1af9e436bba /libcxx/test | |
parent | 8419cf307eeb9d44f686da280fdb789ba0d0506d (diff) | |
download | bcm5719-llvm-925faf274c16eada7496f0c76cc50d1293328a70.tar.gz bcm5719-llvm-925faf274c16eada7496f0c76cc50d1293328a70.zip |
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<int>' 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.
llvm-svn: 333327
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/libcxx/atomics/diagnose_nonnull.fail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/libcxx/atomics/diagnose_nonnull.fail.cpp b/libcxx/test/libcxx/atomics/diagnose_nonnull.fail.cpp index a1f6332acd0..98d299bf854 100644 --- a/libcxx/test/libcxx/atomics/diagnose_nonnull.fail.cpp +++ b/libcxx/test/libcxx/atomics/diagnose_nonnull.fail.cpp @@ -17,8 +17,8 @@ #include <atomic> int main() { - std::atomic<int> ai = ATOMIC_VAR_INIT(0); - volatile std::atomic<int> vai = ATOMIC_VAR_INIT(0); + std::atomic<int> ai; + volatile std::atomic<int> vai; int i = 42; atomic_is_lock_free((const volatile std::atomic<int>*)0); // expected-error {{null passed to a callee that requires a non-null argument}} |