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

Markus Böck via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 19 01:10:54 PDT 2023


zero9178 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

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


More information about the cfe-commits mailing list