summaryrefslogtreecommitdiff
path: root/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/StringRef.cpp')
-rw-r--r--lib/Support/StringRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/StringRef.cpp b/lib/Support/StringRef.cpp
index 90992fce0bcc..9ba7a09f9962 100644
--- a/lib/Support/StringRef.cpp
+++ b/lib/Support/StringRef.cpp
@@ -586,7 +586,7 @@ bool StringRef::getAsDouble(double &Result, bool AllowInexact) const {
APFloat::opStatus Status =
F.convertFromString(*this, APFloat::rmNearestTiesToEven);
if (Status != APFloat::opOK) {
- if (!AllowInexact || Status != APFloat::opInexact)
+ if (!AllowInexact || !(Status & APFloat::opInexact))
return true;
}