[all-commits] [llvm/llvm-project] f331e1: [support] Revise ScopedPrinter formatting tests fo...

Paul Kirth via All-commits all-commits at lists.llvm.org
Fri Apr 7 10:09:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f331e13d53c58703073f189195f99def5e3ff6c1
      https://github.com/llvm/llvm-project/commit/f331e13d53c58703073f189195f99def5e3ff6c1
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    M llvm/unittests/Support/ScopedPrinterTest.cpp

  Log Message:
  -----------
  [support] Revise ScopedPrinter formatting tests for floats

Previously there were several attempts to make the format checks for NaN
and Inf work across platforms, like AIX and Solaris, that print these
values slightly differently. This resulted in a number of forward fixes,
until we finally disabled the tests for NaN and Inf. This change should
make the test robust across different platforms, and reduce the overall
amount of code by delegating to helper functions that use the same
format strings as the implementations used by PrintNumber().

This additionally reverts commit 5a9bad171be5dfdf9430a0f6cbff14d29ca54181
and fa56e362af475e0758cfb41c42f78db50da7235c.

Reviewed By: jhenderson

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




More information about the All-commits mailing list