diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-07 22:13:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-07 22:13:43 +0000 |
commit | a0173131fa60510bcf8d9f6d7df8cc258e9efd5b (patch) | |
tree | 27b7ebfe75352627fc48249f162957035efd6dcd /clang/lib/AST/StmtPrinter.cpp | |
parent | f09c3721911d9af4e39764b5c474427384929fe0 (diff) | |
download | bcm5719-llvm-a0173131fa60510bcf8d9f6d7df8cc258e9efd5b.tar.gz bcm5719-llvm-a0173131fa60510bcf8d9f6d7df8cc258e9efd5b.zip |
Fix ast dumping to work with long double literals, e.g. we dump:
long double X() { return 1.0L; }
as:
long double X()
(CompoundStmt 0xb06a00 <t.c:2:17, col:32>
(ReturnStmt 0xb068d0 <col:19, col:26>
(FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000)))
llvm-svn: 52080
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index a740facf76f..5e347435b63 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -577,7 +577,7 @@ void StmtPrinter::VisitIntegerLiteral(IntegerLiteral *Node) { } void StmtPrinter::VisitFloatingLiteral(FloatingLiteral *Node) { // FIXME: print value more precisely. - OS << Node->getValueAsDouble(); + OS << Node->getValueAsApproximateDouble(); } void StmtPrinter::VisitImaginaryLiteral(ImaginaryLiteral *Node) { |