Clang: Set -fms-compatibility-version explicitly

Infer the version from the _MSC_FULL_VER macro, so it cannot get out of sync
with that.

Adapt the analyzer to do the same.

Based on

  commit daf08d8702
  Clang Static Analyzer: Workaround analyzing MSVC2015 projects with clang 3.8.0

Change-Id: I9d34abdbe2c83fe271eadd8d051caad43aca6772
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-04-11 11:53:50 +02:00
parent b0959ee66f
commit 5ff5211a25
4 changed files with 132 additions and 34 deletions

View File

@@ -51,6 +51,8 @@ public:
virtual void addLanguageOption(ProjectFile::Kind fileKind);
virtual void addOptionsForLanguage(bool checkForBorlandExtensions = true);
void addMsvcCompatibilityVersion();
protected:
virtual bool excludeDefineLine(const QByteArray &defineLine) const;
virtual bool excludeHeaderPath(const QString &headerPath) const;