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
2 files changed