| commit | 817d4af55763926369c1df52d0c0ccaeb793cfc4 | [log] [tgz] |
|---|---|---|
| author | John McCall <rjmccall@apple.com> | Wed Nov 10 23:38:19 2010 +0000 |
| committer | John McCall <rjmccall@apple.com> | Wed Nov 10 23:38:19 2010 +0000 |
| tree | c03c1b07710f543073f623eea9edff31414ed71c | |
| parent | 5a8d781caa859fb53d02be33e8ec136df3a278b7 [diff] |
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. llvm-svn: 118735