if (!isRepresentableIntegerValue(Context, EnumVal, Context.IntTy))
Diag(IdLoc, diag::ext_enum_value_not_int)
<< EnumVal.toString(10) << Val->getSourceRange()
- << EnumVal.isNonNegative();
+ << (EnumVal.isUnsigned() || EnumVal.isNonNegative());
else if (!Context.hasSameType(Val->getType(), Context.IntTy)) {
// Force the type of the expression to 'int'.
ImpCastExprToType(Val, Context.IntTy, CastExpr::CK_IntegralCast);
c = -2147483649, // expected-warning {{ISO C restricts enumerator values to range of 'int'}}
d = 2147483647 };
enum h { e = -2147483648, // too pos
- f = 2147483648 // expected-warning {{ISO C restricts enumerator values to range of 'int'}}
+ f = 2147483648, // expected-warning {{ISO C restricts enumerator values to range of 'int'}}
+ i = 0xFFFF0000 // expected-warning {{too large}}
};
// minll maxull