Revert "Emit an error when mixing <stdatomic.h> and <atomic>"
authorVolodymyr Sapsai <vsapsai@apple.com>
Wed, 2 May 2018 19:52:07 +0000 (19:52 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Wed, 2 May 2018 19:52:07 +0000 (19:52 +0000)
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

clang/lib/Headers/stdatomic.h
clang/test/Headers/stdatomic.cpp [deleted file]

index c05702c..b4845a7 100644 (file)
 # 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 (file)
index 322f26a..0000000
+++ /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