On Tue, Jul 22, 2014 at 4:34 PM, Richard Smith <[email protected]> wrote: > > On 22 Jul 2014 07:22, "Aaron Ballman" <[email protected]> wrote: >> >> Author: aaronballman >> Date: Tue Jul 22 09:08:09 2014 >> New Revision: 213657 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=213657&view=rev >> Log: >> Provide extra information in the "integer constant is too large" >> diagnostic. This will be used to improve other diagnostics. >> >> Modified: >> cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td >> cfe/trunk/lib/Lex/PPExpressions.cpp >> cfe/trunk/lib/Sema/SemaExpr.cpp >> cfe/trunk/test/CXX/lex/lex.literal/lex.ext/p3.cpp >> cfe/trunk/test/Lexer/constants.c >> cfe/trunk/test/Sema/128bitint.c >> >> Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td?rev=213657&r1=213656&r2=213657&view=diff >> >> ============================================================================== >> --- cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td (original) >> +++ cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td Tue Jul 22 >> 09:08:09 2014 >> @@ -103,9 +103,9 @@ def warn_cxx98_compat_longlong : Warning >> "'long long' is incompatible with C++98">, >> InGroup<CXX98CompatPedantic>, DefaultIgnore; >> def err_integer_too_large : Error< >> - "integer constant is larger than the largest unsigned integer type">; >> + "integer constant is larger than the largest %0-bit unsigned integer >> type">; > > The wording here could be better -- all 32-bit integer types are the same > size, by definition. > > Perhaps "integer constant evaluates to value %0 that cannot be represented > as a %1-bit %select{signed|unsigned}2 integer"?
Something like this? ~Aaron
NumericLiteral.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
