[cfe-commits] r41340 - /cfe/trunk/Sema/SemaExpr.cpp
Chris Lattner
sabre at nondot.org
Thu Aug 23 14:58:08 PDT 2007
Author: lattner
Date: Thu Aug 23 16:58:08 2007
New Revision: 41340
URL: http://llvm.org/viewvc/llvm-project?rev=41340&view=rev
Log:
fix a bug where we would type 0ULL as unsigned instead of unsigned long long
Modified:
cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=41340&r1=41339&r2=41340&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Thu Aug 23 16:58:08 2007
@@ -162,7 +162,8 @@
bool AllowUnsigned = Literal.isUnsigned || Literal.getRadix() != 10;
// Check from smallest to largest, picking the smallest type we can.
- if (!Literal.isLong) { // Are int/unsigned possibilities?
+ if (!Literal.isLong && !Literal.isLongLong) {
+ // Are int/unsigned possibilities?
unsigned IntSize = Context.getTypeSize(Context.IntTy,Tok.getLocation());
// Does it fit in a unsigned int?
if (ResultVal.isIntN(IntSize)) {
More information about the cfe-commits
mailing list