[PATCH] D70200: Fix illegal cast from uint64_t to int64_t

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 13:28:31 PST 2019


vsk added a comment.

Thanks, lgtm with a comment.



================
Comment at: llvm/tools/llvm-cov/CoverageExporterJson.cpp:65
 
+int64_t clamp_uint64_to_int64(uint64_t u) {
+  uint64_t int64_max = static_cast<uint64_t>(std::numeric_limits<int64_t>::max());
----------------
Please leave a comment explaining why the format makes clamping necessary.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70200/new/

https://reviews.llvm.org/D70200





More information about the llvm-commits mailing list