|
@@ -3117,7 +3117,8 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {
|
|
|
} else {
|
|
|
llvm::APInt ResultVal(Context.getTargetInfo().getLongLongWidth(), 0);
|
|
|
if (Literal.GetIntegerValue(ResultVal))
|
|
|
- Diag(Tok.getLocation(), diag::err_integer_too_large);
|
|
|
+ Diag(Tok.getLocation(), diag::err_integer_too_large)
|
|
|
+ << ResultVal.getBitWidth();
|
|
|
Lit = IntegerLiteral::Create(Context, ResultVal, CookedTy,
|
|
|
Tok.getLocation());
|
|
|
}
|
|
@@ -3210,7 +3211,8 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {
|
|
|
|
|
|
if (Literal.GetIntegerValue(ResultVal)) {
|
|
|
// If this value didn't fit into uintmax_t, error and force to ull.
|
|
|
- Diag(Tok.getLocation(), diag::err_integer_too_large);
|
|
|
+ Diag(Tok.getLocation(), diag::err_integer_too_large)
|
|
|
+ << ResultVal.getBitWidth();
|
|
|
Ty = Context.UnsignedLongLongTy;
|
|
|
assert(Context.getTypeSize(Ty) == ResultVal.getBitWidth() &&
|
|
|
"long long is not intmax_t?");
|
|
@@ -3290,7 +3292,8 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {
|
|
|
// If we still couldn't decide a type, we probably have something that
|
|
|
// does not fit in a signed long long, but has no U suffix.
|
|
|
if (Ty.isNull()) {
|
|
|
- Diag(Tok.getLocation(), diag::ext_integer_too_large_for_signed);
|
|
|
+ Diag(Tok.getLocation(), diag::ext_integer_too_large_for_signed)
|
|
|
+ << ResultVal.getBitWidth();
|
|
|
Ty = Context.UnsignedLongLongTy;
|
|
|
Width = Context.getTargetInfo().getLongLongWidth();
|
|
|
}
|