[libcxx-commits] [PATCH] D129928: Conversion from '__int64' to 'long', possible loss of data

Igor Zhukov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 16 10:32:01 PDT 2022


fsb4000 updated this revision to Diff 445237.
fsb4000 added a comment.

use `int64_t` instead of `long long`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129928

Files:
  libcxx/test/std/time/time.hms/time.hms.members/seconds.pass.cpp
  libcxx/test/std/time/time.hms/time.hms.members/subseconds.pass.cpp


Index: libcxx/test/std/time/time.hms/time.hms.members/subseconds.pass.cpp
===================================================================
--- libcxx/test/std/time/time.hms/time.hms.members/subseconds.pass.cpp
+++ libcxx/test/std/time/time.hms/time.hms.members/subseconds.pass.cpp
@@ -17,13 +17,14 @@
 
 #include <chrono>
 #include <cassert>
+#include <cstdint>
 #include <ratio>
 #include <utility>
 
 #include "test_macros.h"
 
 template <typename Duration>
-constexpr long check_subseconds(Duration d)
+constexpr int64_t check_subseconds(Duration d)
 {
     using HMS = std::chrono::hh_mm_ss<Duration>;
     ASSERT_SAME_TYPE(typename HMS::precision, decltype(std::declval<HMS>().subseconds()));
Index: libcxx/test/std/time/time.hms/time.hms.members/seconds.pass.cpp
===================================================================
--- libcxx/test/std/time/time.hms/time.hms.members/seconds.pass.cpp
+++ libcxx/test/std/time/time.hms/time.hms.members/seconds.pass.cpp
@@ -17,13 +17,14 @@
 
 #include <chrono>
 #include <cassert>
+#include <cstdint>
 #include <ratio>
 #include <utility>
 
 #include "test_macros.h"
 
 template <typename Duration>
-constexpr long check_seconds(Duration d)
+constexpr int64_t check_seconds(Duration d)
 {
     using HMS = std::chrono::hh_mm_ss<Duration>;
     ASSERT_SAME_TYPE(std::chrono::seconds, decltype(std::declval<HMS>().seconds()));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129928.445237.patch
Type: text/x-patch
Size: 1381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220716/bd20f8cf/attachment-0001.bin>


More information about the libcxx-commits mailing list