[cfe-commits] [Patch] Extend -Wliteral-conversion to warn on string literals to bool conversion

Richard Trieu rtrieu at google.com
Fri Sep 9 16:13:23 PDT 2011


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: string-literal-to-bool.patch
Type: text/x-patch
Size: 3326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110909/3398d982/attachment.bin>


More information about the cfe-commits mailing list