From 8f64a1d13671dde96873c6245de850b133d7ad32 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Sun, 25 Oct 2015 21:07:02 +0000 Subject: Proper integraton of IWYU into the build (including massaging clang errors into the issues tab). Note: There is at least one ug in QT that stops thing s copiling because it doesn't undertand clangs version --- massage_messages.py | 12 ++++++++++++ qtmappings.imp | 32 ++++++++++++++++++++++---------- src/modinfo.h | 4 ++-- 3 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 massage_messages.py diff --git a/massage_messages.py b/massage_messages.py new file mode 100644 index 00000000..656c48bd --- /dev/null +++ b/massage_messages.py @@ -0,0 +1,12 @@ +# Attempt to massage the messages from clang so that QT recognises them +# expected: source\bsatk\bsafile.cpp(101) : fatal error C1189: #error : "we may have to compress/decompress!" +# clang: source\bsatk\bsafile.cpp(101) : error: "we may have to compress/decompress!" + +import fileinput +import re + +for line in fileinput.input(): + # Look for '\) : ([^:])?:' + # Replace with ') : \1 I0000: + line.rstrip() + print re.sub(r'\)\s*:\s*([^:]*):', r') : \1 I0000:', line) \ No newline at end of file diff --git a/qtmappings.imp b/qtmappings.imp index 17073ddd..deea653f 100644 --- a/qtmappings.imp +++ b/qtmappings.imp @@ -195,7 +195,10 @@ { include: [ "\"qwhatsthis.h\"", "private", "", "public" ] }, { include: [ "\"qwidgetaction.h\"", "private", "", "public" ] }, { include: [ "\"qimagereader.h\"", "private", "", "public" ] }, - + { include: [ "\"qdeclarativecontext.h\"", "private", "", "public" ] }, + { include: [ "\"qdeclarativeview.h\"", "private", "", "public" ] }, +# looks wrong +# { include: [ "\"qgraphicsitem.h\"", "private", "", "public" ] }, # Microsft visual C? @@ -210,7 +213,7 @@ { symbol: [ "ULONG", "private", "", "private" ] }, { include: [ "", "private", "", "private" ] }, # Stringapiset.h - { include: [ "", "private", "", "public" ] }, # Windows.h + { include: [ "", "private", "", "public" ] }, # These are all in windef.h apparently. Which m/s then says 'use Windows.h' { include: [ "", "private", "", "private" ] }, # or in winnt apparently @@ -227,6 +230,7 @@ { include: [ "", "private", "", "private" ] }, # These ones say xxxx.h (include Windows.h) on the ms web site + { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, # VerRsrc.h { include: [ "", "private", "", "public" ] }, @@ -245,14 +249,26 @@ { include: [ "", "private", "", "public" ] }, # These 3 should go to Shellapi.h { include: [ "", "private", "", "public" ] }, - { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, # official name according to website { include: [ "", "private", "", "public" ] }, + # + { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "public" ] }, { include: [ "", "private", "", "public" ] }, -# combaseapi.h is for objbase.h but objbase.h appears to come free with Windows.h -# Windows.h is a pile of ... - { include: [ "", "private", "", "private" ] }, + +# Files that are included by other files which seem to then come for free in Windows.h but +# shouldn't. Again, should be cleaned up. + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "private" ] }, { include: [ "", "private", "", "public" ] }, + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + + { include: [ "", "private", "", "private" ] }, + { include: [ "", "private", "", "public" ] }, + # Huh? This one is sane? { include: [ "", "private", "", "public" ] }, @@ -279,15 +295,11 @@ # Warning: QtGroupingProxy is not provided by Qt -#include "qdeclarativecontext.h" // for QDeclarativeContext -#include "qdeclarativeview.h" // for QDeclarativeView, etc -#include "qgraphicsitem.h" // for QGraphicsObject #include "qpluginloader.h" #include "qnetworkproxy.h" # Ones I don't yet know how to deal with -#include #include "boost/fusion/container/vector/vector10_fwd.hpp" // for fusion #include "boost/iterator/iterator_facade.hpp" // for operator!= #include // for operator delete[], etc diff --git a/src/modinfo.h b/src/modinfo.h index d9de60e8..da97b09b 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -1047,7 +1047,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const { return QDateTime(); } virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } + virtual MOBase::VersionInfo getNewestVersion() const { return ""; } virtual QString getInstallationFile() const { return ""; } virtual int getFixedPriority() const { return INT_MAX; } virtual int getNexusID() const { return -1; } @@ -1099,7 +1099,7 @@ public: virtual QString notes() const { return ""; } virtual QDateTime creationTime() const; virtual QString absolutePath() const; - virtual MOBase::VersionInfo getNewestVersion() const { return QString(); } + virtual MOBase::VersionInfo getNewestVersion() const { return ""; } virtual QString getInstallationFile() const { return ""; } virtual int getNexusID() const { return -1; } virtual std::vector getIniTweaks() const { return std::vector(); } -- cgit v1.3.1