[PATCH] D158959: [clang-tidy] Disambiguate calls to log
Rainer Orth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 27 12:16:26 PDT 2023
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG03dff0d4acaf: [clang-tidy] Disambiguate calls to log (authored by ro).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158959/new/
https://reviews.llvm.org/D158959
Files:
clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
Index: clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
+++ clang-tools-extra/clang-tidy/altera/UnrollLoopsCheck.cpp
@@ -214,10 +214,12 @@
Iterations = ceil(float(InitValue - EndValue) / ConstantValue);
break;
case (BO_MulAssign):
- Iterations = 1 + (log(EndValue) - log(InitValue)) / log(ConstantValue);
+ Iterations = 1 + (log((double)EndValue) - log((double)InitValue)) /
+ log((double)ConstantValue);
break;
case (BO_DivAssign):
- Iterations = 1 + (log(InitValue) - log(EndValue)) / log(ConstantValue);
+ Iterations = 1 + (log((double)InitValue) - log((double)EndValue)) /
+ log((double)ConstantValue);
break;
default:
// All other operators are not handled; assume large bounds.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158959.553808.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230827/887a9421/attachment.bin>
More information about the cfe-commits
mailing list