C++17 and clang-cl leads to error with wmemchr

Hello.

We are trying to adopt clang-cl on windows and migrate to C++17, but that configuration leads to the error described in this bug: https://bugs.llvm.org/show_bug.cgi?id=41226

Does anyone know what can be done to fix this? Either in LLVM or in my code. I am happy to try to provide a patch but I don’t exactly understand what’s going wrong.

Thanks,
Tobias.

I read through the issue again, and I think this isn’t as bad as I thought it was last year. I responded on the bug (https://bugs.llvm.org/show_bug.cgi?id=41226#c16). I think the solution is going to be to call MarkFunctionReferenced (ODR use) for all the builtins that MSVC doesn’t provide out of line definitions for.