D7752: Make it possible for IBuildSystem to provide extra arguments to the parser
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Fri Sep 15 12:23:10 UTC 2017
apol added a comment.
In https://phabricator.kde.org/D7752#146024, @brauch wrote:
> There are some arguments which we shouldn't pass on, for example I have a qmake project here which does QMAKE_CXXFLAGS += -Werror=return-type and that completely breaks everything (no highlighting any more whatsoever, parsing of all files fails, ...), Not even sure why, but I guess -Werror arguments should never be passed on in our case.
>
> Should I make extraArguments() return a string list and add a blacklist for those? Better ideas?
I just tested this and it works for me, you must be seeing a different issue.
diff --git a/plugins/clang/clangsettings/clangsettingsmanager.cpp b/plugins/clang/clangsettings/clangsettingsmanager.cpp
index 517a341982..86de70a778 100644
--- a/plugins/clang/clangsettings/clangsettingsmanager.cpp
+++ b/plugins/clang/clangsettings/clangsettingsmanager.cpp
@@ -121,6 +121,7 @@ QVector<QByteArray> ParserSettings::toClangAPI() const
std::back_inserter(result),
[] (const QString &argument) { return argument.toUtf8(); });
+ result << "-Werror=return-type";
return result;
}
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D7752
To: apol, #kdevelop, kfunk, mwolff
Cc: brauch, mwolff, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170915/c138c242/attachment.html>
More information about the KDevelop-devel
mailing list