Add a new warning to -Wliteral-conversion to catch cases where a string literal
is cast to a boolean. An exception has been made for string literals in logical expressions to allow the common case of use in assert statements. bool x; x = "hi"; // Warn here void foo(bool x); foo("hi"); // Warn here assert(0 && "error"); assert("error); // Warn here llvm-svn: 140405
Loading
Please register or sign in to comment