[PATCH] D105595: [flang] Compile error instantiating std::clock_t on Apple clang version 11.0.0
Diana Picus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 23:07:50 PDT 2021
rovka added inline comments.
================
Comment at: flang/runtime/time-intrinsic.cpp:39
std::clock_t timestamp{std::clock()};
- if (timestamp != std::clock_t{-1}) {
+ if (timestamp != std::clock_t{static_cast<clock_t>(-1)}) {
return static_cast<double>(timestamp) / CLOCKS_PER_SEC;
----------------
Can we simplify to this instead?
```
timestamp != static_cast<std::clock_t>(-1)
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105595/new/
https://reviews.llvm.org/D105595
More information about the llvm-commits
mailing list