This patch fixes PR25788, which allows for the parsing of
floating-point constants in non-C locales.
Patch by Antoine Pitrou!
Differential Revision: http://reviews.llvm.org/D15375
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271574
91177308-0d34-0410-b5e6-
96231b3b80d8
}
}
- APFloatVal = APFloat(std::atof(TokStart));
+ APFloatVal = APFloat(APFloat::IEEEdouble,
+ StringRef(TokStart, CurPtr - TokStart));
return lltok::APFloat;
}
}
}
- APFloatVal = APFloat(std::atof(TokStart));
+ APFloatVal = APFloat(APFloat::IEEEdouble,
+ StringRef(TokStart, CurPtr - TokStart));
return lltok::APFloat;
}