Running this new warning over LLVM and Clang has found seven broken asserts.
They were in the form of:
  assert("error message");
instead of:
  assert(0 && "error message");
These have been since corrected.  Six of them were straight replacement.
Eli Friedman fixed the seventh case by correcting the surrounding code.

Relevant changes are in revisions are in the range of 139449-139461

On Fri, Sep 9, 2011 at 4:13 PM, Richard Trieu <[email protected]> wrote:
> Add a new warning and bundle it into -Wliteral-conversion.  This
> warning triggers on cases where a string literal is implicitly
> converted to a bool.  For the common case of:
>
> assert(condition && "Error text");
>
> an exception for string literals in logical operations has also been included.
>

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to