[PATCH] D15375: Fix PR #25788: parsing of floating-point constants on non-C locales
Antoine Pitrou via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 11:37:44 PST 2015
pitrou added inline comments.
================
Comment at: unittests/AsmParser/AsmParserTest.cpp:90
@@ +89,3 @@
+ char *oldLoc = setlocale(LC_ALL, NULL);
+ if (setlocale(LC_ALL, "fr_FR.UTF-8")) {
+ V = parseConstantValue("double 1.25e+01", Error, M);
----------------
hfinkel wrote:
> I don't think we can use this here because it is not thread safe (and gtest might run multiple tests in parallel).
>
> I'm fine with this going in without a regression test if there's no reasonable way to construct one.
>
Yes, it's the only way of testing I could think about. Unfortunately the Unix locale system isn't very flexible...
I'll strip the test code and re-submit if nobody else suggests an idea.
http://reviews.llvm.org/D15375
More information about the llvm-commits
mailing list