[cfe-commits] r167992 - in /cfe/trunk: lib/Sema/SemaChecking.cpp test/Analysis/additive-folding.cpp test/SemaCXX/compare.cpp

Richard Trieu rtrieu at google.com
Thu Nov 15 17:34:19 PST 2012


On Thu, Nov 15, 2012 at 3:25 PM, Richard Trieu <rtrieu at google.com> wrote:

> On Thu, Nov 15, 2012 at 2:50 PM, Joerg Sonnenberger <
> joerg at britannica.bec.de> wrote:
>
>> On Thu, Nov 15, 2012 at 02:02:54PM -0800, Richard Smith wrote:
>> > On Thu, Nov 15, 2012 at 1:57 PM, Joerg Sonnenberger
>> > <joerg at britannica.bec.de> wrote:
>> > > On Wed, Nov 14, 2012 at 10:50:24PM -0000, Richard Trieu wrote:
>> > >> Author: rtrieu
>> > >> Date: Wed Nov 14 16:50:24 2012
>> > >> New Revision: 167992
>> > >>
>> > >> URL: http://llvm.org/viewvc/llvm-project?rev=167992&view=rev
>> > >> Log:
>> > >> Improve -Wtautological-constant-out-of-range-compare by taking into
>> account
>> > >> type conversion between integers.  This allows the warning to be
>> more accurate.
>> > >>
>> > >> Also, turned the warning off in an analyzer test.  The relavent test
>> cases
>> > >> are covered by the tests in Sema.
>> > >
>> > > This gives invalid warnings now. Example:
>> > >
>> > > typedef enum {
>> > >  PT_DESCENDING=-1,
>> > >  PT_ASCENDING=1
>> > > } pt_direction_t;
>> > >
>> > > int
>> > > ptree_iterate(pt_direction_t direction)
>> > > {
>> > >   return (direction == PT_ASCENDING) ? 1 : 0;
>> > > }
>> >
>> > Was this not fixed by r168023?
>>
>> I have r168047 here.
>>
>> Joerg
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
> This looks like a bad calculation of the integer range.  I'll take a look
> into it.
>

Fixed in r168126.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121115/21c2466e/attachment.html>


More information about the cfe-commits mailing list