The other problem is that clang for some reason doesn't define `_MSC_VER` by default. I found that it's defined only if I pass `-fuse-ld=lld` to the command line. That's weird because it shouldn't affect compilation step, it should matter only for linking and that's when we pass it. I didn't track it down in clang code itself, but if we can't depend on clang providing it by default, we need to make sure to pass `-fms-compatibility-version` ourselves. The exact version doesn't really matter, we mostly need to make sure that it's defined at all so that our #ifdefs work correctly.
This sounds extremely surprising - and I really don't see how `-fuse-ld=lld` could affect this. `_MSC_VER` is pretty much the most basic define for the MSVC target mode... Although I guess that if there's some heuristic for figuring out _what_ to set the define to, that can fail in some cases - maybe? The fix, setting `-fms-compatibility-version=19` is probably quite harmless in any case, but I'd be very much interested in figuring out what really is going on here.
How do I reproduce this situation?