summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/customtoolchain.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2018-09-27 10:18:44 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2018-10-08 09:07:56 +0000
commit5900766ecb6aa25f363660c5ad2ef15777db5053 (patch)
tree1d6b10063dd286b16442e84e9fef11706f8a4c45 /src/plugins/projectexplorer/customtoolchain.h
parent9192b6b024d9cdff1493e0d23fee43175825a59c (diff)
downloadqt-creator-5900766ecb6aa25f363660c5ad2ef15777db5053.tar.gz
Toolchains: Detect unspecified language version
We checked the command line from the project manager for "-std=X" and friends to figure out the language version to use. However, if such a flag was not provided, we assumed the latest version we support. This could conflict with the actual version of the compiler and its predefined macros. Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the predefined macros of the toolchain. The MSVC compiler is an exception to this, as it does not seem to properly set the value - check for _MSVC_LANG if possible, otherwise simply assume some versions as before. While at it, add also support for C17/C18 and the upcoming C++2a. Task-number: QTCREATORBUG-20884 Task-number: QTCREATORBUG-21188 Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/customtoolchain.h')
-rw-r--r--src/plugins/projectexplorer/customtoolchain.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/customtoolchain.h b/src/plugins/projectexplorer/customtoolchain.h
index 23abb2e730..28fd7a1828 100644
--- a/src/plugins/projectexplorer/customtoolchain.h
+++ b/src/plugins/projectexplorer/customtoolchain.h
@@ -71,7 +71,7 @@ public:
bool isValid() const override;
- PredefinedMacrosRunner createPredefinedMacrosRunner() const override;
+ MacroInspectionRunner createMacroInspectionRunner() const override;
Macros predefinedMacros(const QStringList &cxxflags) const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cxxflags) const override;