1.0 is double, 1.0F is a float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41412 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 9539a91..1c53955 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -221,8 +221,8 @@
     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);
 }