Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-20 Thread Roman Lebedev via cfe-commits
On Sat, Sep 9, 2017 at 12:56 AM, Aaron Ballman wrote: > On Fri, Sep 8, 2017 at 5:49 PM, Hans Wennborg via cfe-commits > wrote: >> On Fri, Sep 8, 2017 at 2:26 PM, Friedman, Eli >> wrote: >>> On 9/8/2017 2:18 PM, Hans Wennborg via cfe-commits wrote: On Fri, Sep 8, 2017 at 2:09 PM, Roman

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-19 Thread Roman Lebedev via cfe-commits
On Fri, Sep 8, 2017 at 7:10 PM, Roman Lebedev wrote: > On Fri, Sep 8, 2017 at 3:26 PM, Roman Lebedev wrote: >> On Fri, Sep 8, 2017 at 2:48 PM, Sam McCall wrote: >> Hi. >> >>> Nice fix! >> Thank you! >> >>> It catches a lot of new cases on our codebase, all technically >>> correct so far. >>> >>>

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Aaron Ballman via cfe-commits
On Fri, Sep 8, 2017 at 5:49 PM, Hans Wennborg via cfe-commits wrote: > On Fri, Sep 8, 2017 at 2:26 PM, Friedman, Eli wrote: >> On 9/8/2017 2:18 PM, Hans Wennborg via cfe-commits wrote: >>> >>> On Fri, Sep 8, 2017 at 2:09 PM, Roman Lebedev >>> wrote: Interesting. My first thought w

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Roman Lebedev via cfe-commits
On Sat, Sep 9, 2017 at 12:18 AM, Hans Wennborg wrote: > On Fri, Sep 8, 2017 at 2:09 PM, Roman Lebedev wrote: >> On Fri, Sep 8, 2017 at 11:45 PM, Hans Wennborg wrote: >>> On Fri, Sep 8, 2017 at 4:48 AM, Sam McCall via cfe-commits >>> wrote: Nice fix! It catches a lot of new cases on our cod

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Hans Wennborg via cfe-commits
On Fri, Sep 8, 2017 at 2:26 PM, Friedman, Eli wrote: > On 9/8/2017 2:18 PM, Hans Wennborg via cfe-commits wrote: >> >> On Fri, Sep 8, 2017 at 2:09 PM, Roman Lebedev >> wrote: >>> >>> >>> Interesting. My first thought was to explicitly specify enum as signed: >>> >>> enum MediaDeviceType : signed

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Friedman, Eli via cfe-commits
On 9/8/2017 2:18 PM, Hans Wennborg via cfe-commits wrote: On Fri, Sep 8, 2017 at 2:09 PM, Roman Lebedev wrote: Interesting. My first thought was to explicitly specify enum as signed: enum MediaDeviceType : signed int { MEDIA_DEVICE_TYPE_AUDIO_INPUT = 0, MEDIA_DEVICE_TYPE_VIDEO_INPUT, MEDIA_DE

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Hans Wennborg via cfe-commits
On Fri, Sep 8, 2017 at 2:09 PM, Roman Lebedev wrote: > On Fri, Sep 8, 2017 at 11:45 PM, Hans Wennborg wrote: >> On Fri, Sep 8, 2017 at 4:48 AM, Sam McCall via cfe-commits >> wrote: >>> Nice fix! It catches a lot of new cases on our codebase, all technically >>> correct so far. >>> >>> A couple o

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Roman Lebedev via cfe-commits
On Fri, Sep 8, 2017 at 11:45 PM, Hans Wennborg wrote: > On Fri, Sep 8, 2017 at 4:48 AM, Sam McCall via cfe-commits > wrote: >> Nice fix! It catches a lot of new cases on our codebase, all technically >> correct so far. >> >> A couple of issues though: >> A) Rollout - until we've completely cleane

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Hans Wennborg via cfe-commits
On Fri, Sep 8, 2017 at 4:48 AM, Sam McCall via cfe-commits wrote: > Nice fix! It catches a lot of new cases on our codebase, all technically > correct so far. > > A couple of issues though: > A) Rollout - until we've completely cleaned up, we need to disable > -Wtautological-compare entirely, whic

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Roman Lebedev via cfe-commits
On Fri, Sep 8, 2017 at 3:26 PM, Roman Lebedev wrote: > On Fri, Sep 8, 2017 at 2:48 PM, Sam McCall wrote: > Hi. > >> Nice fix! > Thank you! > >> It catches a lot of new cases on our codebase, all technically >> correct so far. >> >> A couple of issues though: >> A) Rollout - until we've completely

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Roman Lebedev via cfe-commits
On Fri, Sep 8, 2017 at 2:48 PM, Sam McCall wrote: Hi. > Nice fix! Thank you! > It catches a lot of new cases on our codebase, all technically > correct so far. > > A couple of issues though: > A) Rollout - until we've completely cleaned up, we need to disable > -Wtautological-compare entirely, w

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Sam McCall via cfe-commits
Nice fix! It catches a lot of new cases on our codebase, all technically correct so far. A couple of issues though: A) Rollout - until we've completely cleaned up, we need to disable -Wtautological-compare entirely, which is a valuable check. I imagine anyone else using -Werror is in the same boat

r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-07 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Thu Sep 7 15:14:25 2017 New Revision: 312750 URL: http://llvm.org/viewvc/llvm-project?rev=312750&view=rev Log: [Sema] -Wtautological-compare: handle comparison of unsigned with 0S. Summary: This is a first half(?) of a fix for the following bug: https://bugs.llvm.org/show