diff options
author | Sam McCall <sam.mccall@gmail.com> | 2017-11-21 19:37:35 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2017-11-21 19:37:35 +0000 |
commit | 777832c48fddd177fa1219529066542cac4dbab9 (patch) | |
tree | 4361c01de6b2ebcf62504425e6d5439dbc320f3d /unittests | |
parent | 7d228225a95bf467ea416223e2a0ab49d25f7afe (diff) |
[clangd] avoid divide by literal zero to satisfy msvc
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@318798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/clangd/JSONExprTests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/clangd/JSONExprTests.cpp b/unittests/clangd/JSONExprTests.cpp index f8e6275a..d1bcf7a2 100644 --- a/unittests/clangd/JSONExprTests.cpp +++ b/unittests/clangd/JSONExprTests.cpp @@ -131,7 +131,7 @@ TEST(JSONTest, Parse) { Compare(R"(42)", 42); Compare(R"(2.5)", 2.5); Compare(R"(2e50)", 2e50); - Compare(R"(1.2e3456789)", 1.0 / 0.0); + Compare(R"(1.2e3456789)", std::numeric_limits<double>::infinity()); Compare(R"("foo")", "foo"); Compare(R"("\"\\\b\f\n\r\t")", "\"\\\b\f\n\r\t"); |