IsIntegralPromotion should consider the signedness of FromType when
calculating promotions. This, as of now, cannot be exercised on any
platform so there is no corresponding test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135803
91177308-0d34-0410-b5e6-
96231b3b80d8
ToType->isIntegerType()) {
// Determine whether the type we're converting from is signed or
// unsigned.
- bool FromIsSigned;
+ bool FromIsSigned = FromType->isSignedIntegerType();
uint64_t FromSize = Context.getTypeSize(FromType);
- // FIXME: Is wchar_t signed or unsigned? We assume it's signed for now.
- FromIsSigned = true;
-
// The types we'll try to promote to, in the appropriate
// order. Try each of these types.
QualType PromoteTypes[6] = {