From ade68c99497f6b9c94273421f84fb8dc951554fa Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Tue, 18 Oct 2022 09:26:32 +0800 Subject: [PATCH] MSVC: Disable buggy conformance check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /Zc:lambda seems buggy. Although in my experiments it works well for 99% Qt repos, it seems some tests will trigger the bug and it also blocks some new commits. So disable it for now, it's not stable enough. Now that this check is disabled, the workaround for tst_qstringapisymmetry is also not needed anymore, so remove the workaround as well. Partially reverts commit 8cb832090a8a0e7226904561f97c6de954d752ed Change-Id: Icf0ecbbaa6262522470e5f5dea05705985ab18f1 Reviewed-by: Jörg Bornemann --- cmake/QtInternalTargets.cmake | 2 +- .../corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 9dbf63000c..363d510fd1 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -248,7 +248,7 @@ if (MSVC) if (MSVC_VERSION GREATER_EQUAL 1919 AND NOT CLANG) # MSVC 2019 target_compile_options(PlatformCommonInternal INTERFACE -Zc:externConstexpr - -Zc:lambda + #-Zc:lambda # Buggy. TODO: Enable again when stable enough. -Zc:preprocessor ) endif() diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp index 0360a61832..91b2592877 100644 --- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp +++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp @@ -2626,7 +2626,7 @@ void tst_QStringApiSymmetry::toNumberWithBases_data() QTest::addColumn("result"); QTest::addColumn("ok"); - static constexpr struct { + constexpr struct { const char prefix[3]; int base; } bases[] = {