[all-commits] [llvm/llvm-project] e62003: [clang] Use current rounding mode for float inc/de...

Serge Pavlov via All-commits all-commits at lists.llvm.org
Thu Nov 30 02:33:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e620035a28d5d957623aa7b4aeda35ab5130e2c9
      https://github.com/llvm/llvm-project/commit/e620035a28d5d957623aa7b4aeda35ab5130e2c9
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2023-11-30 (Thu, 30 Nov 2023)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/rounding-math.cpp

  Log Message:
  -----------
  [clang] Use current rounding mode for float inc/dec (#73770)

Increment and decrement are equivalent to adding or subtracting 1. For
the floating-point values these operations depend on the current
rounding mode. Teach constant evaluator to perform ++ and -- according
to the current floating-point environment.

Pull request: https://github.com/llvm/llvm-project/pull/73770




More information about the All-commits mailing list