diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-08-26 03:29:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-08-26 03:29:23 +0000 |
| commit | ed045421a8ca18e9504e8465add68033b5f3fc5b (patch) | |
| tree | 97ab557741c561321ac567258343e7fb5f8a1652 /clang/Sema | |
| parent | f55ab1866373d89680806daa0f70f7c70f078eed (diff) | |
| download | bcm5719-llvm-ed045421a8ca18e9504e8465add68033b5f3fc5b.tar.gz bcm5719-llvm-ed045421a8ca18e9504e8465add68033b5f3fc5b.zip | |
1.0 is double, 1.0F is a float.
llvm-svn: 41412
Diffstat (limited to 'clang/Sema')
| -rw-r--r-- | clang/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index 9539a916f10..1c539558f84 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -221,8 +221,8 @@ Action::ExprResult Sema::ParseNumericConstant(const Token &Tok) { return new IntegerLiteral(ResultVal, t, Tok.getLocation()); } else if (Literal.isFloatingLiteral()) { // FIXME: handle float values > 32 (including compute the real type...). - return new FloatingLiteral(Literal.GetFloatValue(), Context.FloatTy, - Tok.getLocation()); + QualType Ty = Literal.isFloat ? Context.FloatTy : Context.DoubleTy; + return new FloatingLiteral(Literal.GetFloatValue(), Ty, Tok.getLocation()); } return ExprResult(true); } |

