Endill added a comment. In D151661#4380060 <https://reviews.llvm.org/D151661#4380060>, @mstorsjo wrote:
> In D151661#4379958 <https://reviews.llvm.org/D151661#4379958>, @Endill wrote: > >> Thank you! >> I've asked Aaron what is the best way to check for MSVC-like triple before >> relanding this test. So today we both learned. > > Generally, the canonical way to check for it is `#ifdef _MSC_VER` - however > in the `%clang_cc1` tests, it's not automatically defined. This, because the > driver heuristically tries to guess a MSVC version to mimic, which it then > passes as a version number to `clang -cc1` with `-fms-compatibility-version` > or similar. When invoking `clang -cc1` manually, this doesn't get set and > `_MSC_VER` is undefined. Yes, I remember checking `_MSC_VER` and `_MSC_FULL_VER`, but they didn't work. > (I'm considering changing code to make sure that `_MSC_VER` always is defined > in such cases too, even to a dummy version number .) That would be fantastic for DR and conformance tests! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151661/new/ https://reviews.llvm.org/D151661 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits