[all-commits] [llvm/llvm-project] fd6290: [libc++] Fix incorrect overflow checking in std::l...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jun 25 06:35:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd62906ddb252298f6ed63fe85e146d477acdaed
      https://github.com/llvm/llvm-project/commit/fd62906ddb252298f6ed63fe85e146d477acdaed
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    M libcxx/include/__numeric/gcd_lcm.h
    M libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp

  Log Message:
  -----------
  [libc++] Fix incorrect overflow checking in std::lcm (#96310)

We should have been using __builtin_mul_overflow from the start instead
of adding a manual (and error-prone) check for overflow.

Fixes #96196



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list