diff --git a/clang/lib/Headers/stdatomic.h b/clang/lib/Headers/stdatomic.h --- a/clang/lib/Headers/stdatomic.h +++ b/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() && !defined(_MSC_VER) +#if __STDC_HOSTED__ && \ + __has_include_next() && !(defined(_MSC_VER) && !defined(__cplusplus)) # include_next #else