aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
index 188725da9..dac511003 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
@@ -356,12 +356,16 @@ QByteArrayList emulatedCompilerOptions()
LanguageLevel emulatedCompilerLanguageLevel()
{
-#if defined(Q_CC_MSVC) && _MSC_VER > 1900
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ return LanguageLevel::Cpp17;
+#else
+# if defined(Q_CC_MSVC) && _MSC_VER > 1900
// Fixes constexpr errors in MSVC2017 library headers with Clang 4.1..5.X (0.45 == Clang 6).
if (libClangVersion() < QVersionNumber(0, 45))
return LanguageLevel::Cpp1Z;
-#endif // Q_CC_MSVC && _MSC_VER > 1900
+# endif // Q_CC_MSVC && _MSC_VER > 1900
return LanguageLevel::Cpp14; // otherwise, t.h is parsed as "C"
+#endif // Qt 5
}
struct LanguageLevelMapping