aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/Expr.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 94c02aa3e9..73f730ef64 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -225,7 +225,11 @@ public:
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