summaryrefslogtreecommitdiffstats
path: root/clang/Sema
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-26 03:29:23 +0000
committerChris Lattner <sabre@nondot.org>2007-08-26 03:29:23 +0000
commited045421a8ca18e9504e8465add68033b5f3fc5b (patch)
tree97ab557741c561321ac567258343e7fb5f8a1652 /clang/Sema
parentf55ab1866373d89680806daa0f70f7c70f078eed (diff)
downloadbcm5719-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.cpp4
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);
}
OpenPOWER on IntegriCloud