summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2018-05-02 19:52:07 +0000
committerVolodymyr Sapsai <vsapsai@apple.com>2018-05-02 19:52:07 +0000
commit2d77119f72fa286dfd1c62904fc8ba9e46983ca8 (patch)
treeb8cbe5b47a5a14aada05b2115e4bba6e568e8131
parentd1d046aa32395d8e9c459e877a03e716d47aca2c (diff)
downloadbcm5719-llvm-2d77119f72fa286dfd1c62904fc8ba9e46983ca8.tar.gz
bcm5719-llvm-2d77119f72fa286dfd1c62904fc8ba9e46983ca8.zip
Revert "Emit an error when mixing <stdatomic.h> and <atomic>"
It reverts r331378 as it caused test failures ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm ThreadSanitizer-x86_64 :: Darwin/libcxx-shared-ptr-stress.mm ThreadSanitizer-x86_64 :: Darwin/xpc-race.mm Only clang part of the change is reverted, libc++ part remains as is because it emits error less aggressively. llvm-svn: 331392
-rw-r--r--clang/lib/Headers/stdatomic.h4
-rw-r--r--clang/test/Headers/stdatomic.cpp10
2 files changed, 0 insertions, 14 deletions
diff --git a/clang/lib/Headers/stdatomic.h b/clang/lib/Headers/stdatomic.h
index c05702c321d..b4845a74e49 100644
--- a/clang/lib/Headers/stdatomic.h
+++ b/clang/lib/Headers/stdatomic.h
@@ -31,10 +31,6 @@
# include_next <stdatomic.h>
#else
-#if !defined(__ALLOW_STDC_ATOMICS_IN_CXX__) && defined(__cplusplus)
-#error "<stdatomic.h> is incompatible with the C++ standard library; define __ALLOW_STDC_ATOMICS_IN_CXX__ to proceed."
-#endif
-
#include <stddef.h>
#include <stdint.h>
diff --git a/clang/test/Headers/stdatomic.cpp b/clang/test/Headers/stdatomic.cpp
deleted file mode 100644
index 322f26a2d66..00000000000
--- a/clang/test/Headers/stdatomic.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 %s -verify
-// RUN: %clang_cc1 -D__ALLOW_STDC_ATOMICS_IN_CXX__ %s -verify
-
-#include <stdatomic.h>
-
-#ifndef __ALLOW_STDC_ATOMICS_IN_CXX__
-// expected-error@stdatomic.h:* {{<stdatomic.h> is incompatible with the C++ standard library}}
-#else
-// expected-no-diagnostics
-#endif
OpenPOWER on IntegriCloud