[all-commits] [llvm/llvm-project] ef25db: [libc++][chrono] Avoid tautological comparisions.
mordante via All-commits
all-commits at lists.llvm.org
Tue Jul 12 10:15:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef25db495bdbceb0f4881d3ee2c5a7a81d70fe2a
https://github.com/llvm/llvm-project/commit/ef25db495bdbceb0f4881d3ee2c5a7a81d70fe2a
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2022-07-12 (Tue, 12 Jul 2022)
Changed paths:
M libcxx/include/__chrono/year.h
Log Message:
-----------
[libc++][chrono] Avoid tautological comparisions.
In our implementation the year is always less than or equal to the
class' `max()`. It's unlikely this ever changes since changing the
year's range will be an ABI break. A static_assert is added as a
guard.
This was reported by @philnik.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D129442
More information about the All-commits
mailing list