summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/compileroptionsbuilder.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-10-17 17:15:15 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2016-10-18 15:03:52 +0000
commitb0a49ca1c1ad6a37bb0f6b4500d6a0625238abb6 (patch)
tree852b20b52f04e7edd6c5db9e9c004ad94895f4fb /src/plugins/cpptools/compileroptionsbuilder.cpp
parentddf1072d53dce57eca9219f8cdd55c22b8d9d142 (diff)
downloadqt-creator-b0a49ca1c1ad6a37bb0f6b4500d6a0625238abb6.tar.gz
Clang: Fix parsing MSVC's crtdefs.h for 64 Bit
...by specifying the word width, as for the Clang Static Analyzer. This has gone unnoticed so far because it looks like that the error diagnostic from the bug report can be extracted with libclang (as shown in the info bar), but is not printed from libclang or clang.exe itself. Task-number: QTCREATORBUG-17130 Change-Id: Ia7a5ee3825c7211cdf80c2166a9eb454ce48cac1 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp
index f3b89c27f6..68a2586c0d 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.cpp
+++ b/src/plugins/cpptools/compileroptionsbuilder.cpp
@@ -87,6 +87,14 @@ void CompilerOptionsBuilder::addDefine(const QByteArray &defineDirective)
m_options.append(defineDirectiveToDefineOption(defineDirective));
}
+void CompilerOptionsBuilder::addWordWidth()
+{
+ const QString argument = m_projectPart.toolChainWordWidth == ProjectPart::WordWidth64Bit
+ ? QLatin1String("-m64")
+ : QLatin1String("-m32");
+ add(argument);
+}
+
void CompilerOptionsBuilder::addTargetTriple()
{
if (!m_projectPart.targetTriple.isEmpty()) {