[PATCH] D139266: Headers: tweak inclusion condition for stdatomic.h

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 4 10:04:50 PST 2022


Mordante added a comment.

Thanks for the patch!



================
Comment at: clang/lib/Headers/stdatomic.h:21
+#if __STDC_HOSTED__ && __has_include_next(<stdatomic.h>)                        \
+    && !(defined(_MSC_VER) && __cplusplus-0 < 202002l)
 # include_next <stdatomic.h>
----------------
Is `__cplusplus-0` intentional? If so please add some comments how this differs from `__cplusplus`.
Since this is a C header we should test whether the macro exists before querying its value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139266



More information about the cfe-commits mailing list