34ff062936ac78142a2c0dc8d1ae6a40df456819 |
|
02-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the check for constant-conversion with width-1 bitfields so it doesn't suppress quite as many cases. Based off a testcase in the gcc testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
0fa063816818ac53a0015a5d2b0328812005b40e |
|
27-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Turn off implicit truncation warning for compound assignment to bitfields; it might be reasonable in some cases, but it clearly doesn't make sense in some cases, like the included testcase. <rdar://problem/10238797>, part 2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
3a643afa402d51b5fc4faccb4329e9c4392d4551 |
|
27-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make the bitfield implicit truncation warning slightly more aggressive, and make the printed warning a bit more accurate. The new behavior matches gcc's -Wconversion. <rdar://problem/10238797>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
5e745da03df27ac620b0a5cc280d0d1757cfbac1 |
|
22-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Only emit implicit constant conversion truncation warnings in reachable code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
91b6014876e9186f968f74a8975ab8fc08ef1b68 |
|
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Undo a refactor-o and base the bitfield-truncation warning on the uncoerced value. Also, whitelist bool bitfields, which aren't really a truncation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
15d7d12226f83de24f96f4bf4e27ebba30fef51e |
|
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Extend the bitfield-truncation warning to initializations. rdar://problem/8652606 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
1844a6e1074a5c1fd8eadac7fc7317c3e29d4653 |
|
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
When -Wconversion computes the range of a type, it uses the (bit-)range of the enumerators rather than the actual expressible range. This is great when dealing with opaque *values* of that type, but when computing the range of the type for purposes of converting *into* it, it produces warnings in cases we don't care about (e.g. enum_t x = 500;). Divide the logic into these two cases and use the more conservative range for targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
935cd6e8529edbb3b0eba660bd934b508766de37 |
|
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Tweak to bitfield-overflow warning: don't warn about storing a positive value into a signed bitfield of the exact width of the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
5dac4c222d9ff25488ac6f0b9642fa0d939ba2f8 |
|
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
beb22aaa22e255241d6a81e8b0a9239f5fa584f3 |
|
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a warning for implicit truncation of constant values due to bitfield assignment. Implements rdar://problem/7809123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|
091f23f1d6d4bcffd6641cda72a6831e08c02ea7 |
|
09-Nov-2010 |
John McCall <rjmccall@apple.com> |
Split out -Wconversion warnings about constant precision into their own subcategory, -Wconstant-conversion, which is on by default. Tweak the constant folder to give better results in the invalid case of a negative shift amount. Implements rdar://problem/6792488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/constant-conversion.c
|