summaryrefslogtreecommitdiffstats
path: root/clang/Sema
diff options
context:
space:
mode:
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