[cfe-commits] r135664 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/Sema/conditional-expr.c test/SemaCXX/compare.cpp test/SemaCXX/conditional-expr.cpp test/SemaCXX/warn-sign-compare.cpp test/SemaCXX/wa

Chandler Carruth chandlerc at google.com
Wed Jul 20 22:53:54 PDT 2011


Hey Richard,

One more issue that I missed in the initial review (sorry about that)

On Wed, Jul 20, 2011 at 7:46 PM, Richard Trieu <rtrieu at google.com> wrote:

> -  test0 = test0 ? EVal : (int) test0; // okay: EVal is an int
> -  test0 = test0 ? // expected-warning {{operands of ? are integers of
> different signs}}
> +  test1 = test0 ? EVal : (int) test0;
> +  test0 = test0 ?
>                   (unsigned) EVal
> -                : (int) test0;
> +                : (int) test0;  // expected-warning {{operand of ? changes
> signedness: 'int' to 'unsigned long'}}
>

Do we want to teach -Wsign-conversion to not warn about the conversion issue
when both LHS and RHS have explicit casts? This seems like the only spot
that's picking up a warning we didn't produce before...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110720/136e5dd3/attachment.html>


More information about the cfe-commits mailing list