[PATCH] D130419: Use `<stdatomic.h>` with MSVC and C++

Igor Zhukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 24 18:11:23 PDT 2022


fsb4000 updated this revision to Diff 447163.
fsb4000 added a comment.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

added a dummy.txt in libcxx directory


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130419/new/

https://reviews.llvm.org/D130419

Files:
  clang/lib/Headers/stdatomic.h
  libcxx/dummy.txt


Index: clang/lib/Headers/stdatomic.h
===================================================================
--- clang/lib/Headers/stdatomic.h
+++ clang/lib/Headers/stdatomic.h
@@ -17,7 +17,8 @@
  * explicitly disallows `stdatomic.h` in the C mode via an `#error`.  Fallback
  * to the clang resource header until that is fully supported.
  */
-#if __STDC_HOSTED__ && __has_include_next(<stdatomic.h>) && !defined(_MSC_VER)
+#if __STDC_HOSTED__ &&                                                         \
+    __has_include_next(<stdatomic.h>) && !(defined(_MSC_VER) && !defined(__cplusplus))
 # include_next <stdatomic.h>
 #else
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130419.447163.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220725/6d146d12/attachment.bin>


More information about the cfe-commits mailing list