Fix that clang static analyzer did not find built-in headers

Clang expects these to lie in "../lib/clang" relative to the clang
executable.

Change-Id: I216860876591dca1fd728e4b1e79b4b07c965620
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Eike Ziller
2016-08-17 13:36:51 +02:00
parent a181ef93c4
commit c412e0bb2a
4 changed files with 26 additions and 13 deletions

View File

@@ -60,8 +60,9 @@ static QString clangExecutableFileName()
QString ClangStaticAnalyzerSettings::defaultClangExecutable() const
{
const QString shippedBinary = Core::ICore::libexecPath() + QLatin1Char('/')
+ clangExecutableFileName();
const QString shippedBinary = Core::ICore::libexecPath()
+ QLatin1String("/clang/bin/")
+ clangExecutableFileName();
if (QFileInfo(shippedBinary).isExecutable())
return shippedBinary;
return clangExecutableFileName();