[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 19 01:44:18 PDT 2023


ChuanqiXu9 wrote:

> According to the docs [0], MSVC actually defaults to `-fno-delayed-template-parsing` (`/Zc:twoPhase-` with MSVC CLI) if using C++20. This is due to `-std:c++20` implying `/permissive-` which implies `/Zc:twoPhase-`. We could therefore just disable it based on language version alone, not just based on whether we are using modules.
> 
> I previously tried to make it the default everywhere in https://reviews.llvm.org/D103772. @rnk argued we could always make it the default. Given that MSVC is essentially phasing it out and making all their headers compatible with `/Zc:twoPhase-` for the sake of C++20 support, it should be more feasible than previously.
> 
> [0] https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170

Thanks for the info! It looks like your patch can cover this patch. And we can be sure that this patch itself is correct. 

Would you like to send that patch itself soon? If not, I'd like to land the patch soon to give better user experience. Then you can revert this. If you plan to send that patch soon, I'd like to discard the patch itself.

https://github.com/llvm/llvm-project/pull/69431


More information about the cfe-commits mailing list