Fwd: [Development] Are we free of code that checks this isn't null?
Aleix Pol
aleixpol at kde.org
Sat Mar 5 23:43:30 UTC 2016
On Sat, Mar 5, 2016 at 1:30 AM, Kevin Funk <kfunk at kde.org> wrote:
> On Friday, March 04, 2016 09:55:16 PM Milian Wolff wrote:
>> On Freitag, 4. März 2016 21:22:03 CET Kevin Funk wrote:
>> > On Friday, March 04, 2016 09:00:21 PM Milian Wolff wrote:
>> > > On Freitag, 4. März 2016 10:51:08 CET Kevin Funk wrote:
>> > > > Are *we* free of it?
>> > > >
>> > > > Simply using this under Clang should tell us about all occurrences:
>> > > > -Werror=undefined-bool-conversion
>> > >
>> > > I think that there where cases in the older code base and they broke
>> > > with
>> > > clang already and I fixed it. I'm not sure whether I found all of those
>> > > though
>> > >
>> > > :)
>> > >
>> > > I'll also take another look.
>> >
>> > Not necessary I think.
>> >
>> > I've build both kdevplatform + kdevelop with a change similar to this:
>> >
>> > if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
>> >
>> > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
>> >
>> > -Werror=undefined-bool-conversion -Werror=tautological-undefined-compare")
>> > endif()
>> >
>> > => No compile errors. => All fine I think.
>> >
>> > I've asked the GCC guys, whether they have more info.
>> >
>> > Question is: want me to commit above patch? I guess it makes sense
>> > nevertheless. See [1] [2] for what things trigger those warnings.
>>
>> LGTM, please add. Do we need to check the clang version though?
>
> Nope.
>
> Warning flags have been there at least since Clang 3.5 times (checked
> earlier).
Makes sense to me. I would get it in ECM though, no need to make it a
KDevelop thing.
Aleix
More information about the KDevelop-devel
mailing list