[PATCH] D103772: [clang-cl] Reenable /Zc:twoPhase by default if targetting MSVC 2017 Update 3 or newer
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 12:34:59 PDT 2021
rnk added a comment.
If we look back at the original intention of our MSVC compatibility work, we tried to accept as much invalid code as necessary to parse "system headers". System headers were widely interpreted to bethe MSVC STL, ATL, and the Windows SDK. So, even if MSVC defaults to delayed template parsing, if system headers parse with /Zc:twoPhase enabled, maybe we could pick a different default. We'd document the behavior change, of course. Delayed template parsing is an ongoing source of bugs (https://llvm.org/pr50676) and maintenance overhead, so it would be worth diverging from MSVC a bit if possible.
So... maybe we should go ahead with this anyway. As I understand it, all these headers parse correctly in the presence of /Zc:twoPhase, and the RTTI issue has been resolved (?), so we should be OK. I think.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103772/new/
https://reviews.llvm.org/D103772
More information about the cfe-commits
mailing list