DirectXMath with Clang-cl

Hello Clang-World,

I tried to compile a simple DirectXMath-Programm with the new clang-cl.

int main(int argc, char **argv)
{
DirectX::XMVECTOR data{120.0f, 240.0f};

data = DirectX::XMVectorMultiply(data, DirectX::XMVECTOR{2.0f, 3.6f});

printf(“Result: {%f, %f}\n”, DirectX::XMVectorGetX(data), DirectX::XMVectorGetY(data));
system(“PAUSE”);

return 0;
} |

  • |

But the compiler fails with >20 Errors, like:
“1> In file included from main.cpp:1:
1> In file included from C:\Program Files (x86)\Windows Kits\8.1\Include\um\DirectXMath.h:1884:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um/DirectXMathVector.inl(412,13): error : member reference base type ‘DirectX::FXMVECTOR’ (aka ‘const __m128’) is not a structure or union
1> return V.m128_f32[i];”

I know, that windows defines __m128 in a different way than clang, but is there no way to use DirectXMath or DirectX with Clang? Will there one day a way to do so?

Kind regards
Björn
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789
Geschäftsführer: Hiroshi Kawamura, Dr Hiroshi Nakamura, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima.

This is https://bugs.llvm.org//show_bug.cgi?id=28250