be0ee875d8a91c031a085cbbd73ad9e8dc1aa8ff |
|
15-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Improve some of the conversion warnings to fire on conversion to bool. Moves the bool bail-out down a little in SemaChecking - so now -Wnull-conversion and -Wliteral-conversion can fire when the target type is bool. Also improve the wording/details in the -Wliteral-conversion warning to match the -Wconstant-conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|
9ce6377714a8eb8f577c87028300421e72b00dc9 |
|
14-Oct-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Only warn in -Wliteral-conversion if the conversion loses information git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|
02fa1b9cd6f185fead44f910733ff1086a6c5a0b |
|
27-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Move string literal to bool conversion into its own warning flag -Wstring-conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|
f1f8b1a404d9ce6f0eb78e97b598a220d8ca9090 |
|
23-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|
634c8af0805ba33b1530470e03aa314141036aa2 |
|
09-Sep-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Extend -Wliteral-conversion to catch "int i = -1.234" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|
f65076ebf5e8bc5ae7b77fe3c3a65dc5db8d763f |
|
10-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Enhance the diagnostic for literal float -> int conversions to suggest rewriting the literal when the value is integral. It is not uncommon to see code written as: const int kBigNumber = 42e5; Without any real awareness that this is no longer an ICE. The note helps automate and ease the process of fixing code that violates the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|
a5b9332418f25338f118358e27303cd510d54107 |
|
17-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement a sub-group of -Wconversion: -Wliteral-conversion. This specifically targets literals which are implicitly converted, a those are more often unintended and trivial to fix. This can be especially helpful for diagnosing what makes 'const int x = 1e6' not an ICE. Original patch authored by Jim Meehan with contributions from other Googlers and a few cleanups from myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-literal-conversion.cpp
|