[cfe-commits] r42237 - /cfe/trunk/include/clang/AST/Expr.h
Chris Lattner
sabre at nondot.org
Sat Sep 22 11:48:32 PDT 2007
Author: lattner
Date: Sat Sep 22 13:48:32 2007
New Revision: 42237
URL: http://llvm.org/viewvc/llvm-project?rev=42237&view=rev
Log:
add comments.
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=42237&r1=42236&r2=42237&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Sat Sep 22 13:48:32 2007
@@ -225,7 +225,11 @@
const llvm::APFloat &getValue() const { return Value; }
- double getValueAsDouble() const {
+ /// getValueAsDouble - This returns the value as an inaccurate double. Note
+ /// that this may cause loss of precision, but is useful for debugging dumps
+ /// etc.
+ double getValueAsDouble() const {
+ // FIXME: We need something for long double here.
if (cast<BuiltinType>(getType())->getKind() == BuiltinType::Float)
return Value.convertToFloat();
else
More information about the cfe-commits
mailing list