D7979: Filter out warnings as error from parser's compile flags

Milian Wolff noreply at phabricator.kde.org
Tue Sep 26 23:34:12 UTC 2017


mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  minor nits, lgtm in general now

INLINE COMMENTS

> parsesession.cpp:68
>  
> +void sanitizeArguments(QVector<QByteArray>& arguments)
> +{

please add a comment explaining why this is needed (it's clear now, but for the future it would be helpful to have a short reminder). Also note down why you handle both, `-Werror` and `-Werror=` (give an example for the latter). It took me a bit to remember what that is for

> parsesession.cpp:71
> +    arguments.erase(std::remove_if(
> +        arguments.begin(),
> +        arguments.end(),

join next line

> parsesession.cpp:73
> +        arguments.end(),
> +        [](QByteArray& argument) {
> +            if (argument == "-Werror") {

const&

> parsesession.cpp:78
> +
> +            argument.replace("-Werror=", "-W");
> +

only on start, no? I.e. we don't want to replace that somewhere in the middle. So instead do a startsWith check and then replace the start range with "-W"

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D7979

To: gracicot, #kdevelop, kfunk, mwolff, brauch
Cc: mwolff, brauch, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170926/961c6295/attachment.html>


More information about the KDevelop-devel mailing list