diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-08-23 21:58:08 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-08-23 21:58:08 +0000 |
| commit | 7b939cf6062fef71fb184eb556c4c9463c240f0d (patch) | |
| tree | 761ac3454130c998742c9bab0260b1fd692cfbbd /clang/Sema | |
| parent | e5b60445e7648fb2606105c2487851e31e5c2d1a (diff) | |
| download | bcm5719-llvm-7b939cf6062fef71fb184eb556c4c9463c240f0d.tar.gz bcm5719-llvm-7b939cf6062fef71fb184eb556c4c9463c240f0d.zip | |
fix a bug where we would type 0ULL as unsigned instead of unsigned long long
llvm-svn: 41340
Diffstat (limited to 'clang/Sema')
| -rw-r--r-- | clang/Sema/SemaExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index 6d5d8527191..f6d00070c4a 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -162,7 +162,8 @@ Action::ExprResult Sema::ParseNumericConstant(const Token &Tok) { 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)) { |

