[all-commits] [llvm/llvm-project] 1f48f8: [libc++] Avoid UB in year_month_day_last::day() fo...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jun 9 10:43:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f48f8f6e289d3ae14d28ad9bd000ef5ba209fc0
      https://github.com/llvm/llvm-project/commit/1f48f8f6e289d3ae14d28ad9bd000ef5ba209fc0
  Author: Louis Dionne <ldionne at apple.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M libcxx/include/chrono

  Log Message:
  -----------
  [libc++] Avoid UB in year_month_day_last::day() for incorrect months

This effectively implements the resolution of LWG3231, which mandates
that calling year_month_day_last::day() on an invalid year_month_day_last
is unspecified behavior. Before this change, it was undefined behavior.

Differential Revision: https://reviews.llvm.org/D81477




More information about the All-commits mailing list