[clang] [Clang][Headers] Workaround for UCRT's `<complex.h>` in `<tgmath.h>` (PR #121650)
A. Jiang via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 4 08:04:34 PST 2025
================
@@ -28,6 +28,30 @@
#define _TG_ATTRSp __attribute__((__overloadable__))
#define _TG_ATTRS __attribute__((__overloadable__, __always_inline__))
+// https://github.com/llvm/llvm-project/issues/45552
+// workaround for MS UCRT's <complex.h>
+#if defined(_VCRUNTIME_H) && defined(_C_COMPLEX_T)
----------------
frederick-vs-ja wrote:
This doesn't seem to be a favorite approach for detecting whether MS UCRT's `<complex.h>` is used. But I'm not aware of any conventional way (the `_COMPLEX` guard looks possible).
Also, I've verified the changes with Clang 18 installed with VS 2022, but perhaps a test in the LLVM repo is desired.
https://github.com/llvm/llvm-project/pull/121650
More information about the cfe-commits
mailing list