The Microsoft STL currently has some issues with P2266.
We disable it for now in that mode, but we might come back later with a
more targetted approach.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential D105518
[clang] disable P2266 simpler implicit moves under -fms-compatibility mizvekov on Jul 6 2021, 5:31 PM. Authored by
Details The Microsoft STL currently has some issues with P2266. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Diff Detail
Event TimelineComment Actions Thank you for working on this! I applied the patch locally and confirmed that it solves the issue at hand. However, I'm not certain this is the right approach; what's the plan moving forward? This patch means that users of clang-cl will not get the simpler implicit moves. Once the STL gets fixed, then what? We can't remove this check for MS compat because then people using older STLs will go back to getting unacceptable compile errors and I'd hate to have to wait for long enough that old MSVC STLs have fallen out of circulation before enabling simpler implicit moves for clang-cl users. Comment Actions I had missed some important context that was in https://reviews.llvm.org/D99005#2860494, namely that this is just to get us back to a good state immediately but there will be further follow-up work to target just the problematic part of the MSVC STL. So long as the follow-up work happens, I think this patch gets us moving forward without causing a lot of churn. If we find that a more targeted approach isn't feasible for some reason, we'll still have to figure out what to do, but at least this enables the feature for users who can use it, which is great. Can you add a test case to demonstrate the behavior with this patch under -fms-compatibility and some comments explaining what's going on (just in case anyone comes peeking while the work is happening)? I'd suggest adding a FIXME comment to SemaStmt.cpp as well, just to be safe, in case the follow-up work is delayed for some reason. Comment Actions I agree with Aaron for the need of a test. At one point, we may wish to replace these calls with getLangOpts().isCompatibleWithMSVC or some similar inspection of MSCompatibilityVersion, but I acknowledge we can't do that until we figure out what the correct version IS! Otherwise this seems like an appropriate temporary solution.
Comment Actions Ping? Normally I wouldn't bother people so quickly, but this patch is addressing a major regression on trunk that had a revert request. We either need to get this landed ASAP or revert the original commit. Comment Actions @aaron.ballman Yeah don't worry, having dinner, my hobby shift is starting soon though :-)
|
This isn't adding a 'tab' character here, is it?