[all-commits] [llvm/llvm-project] 96f1cd: [libc++][test] Silence MSVC warning

Casey Carter via All-commits all-commits at lists.llvm.org
Mon Jan 9 15:05:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96f1cd2427e472acf65e1b0b755a2c1f672e730b
      https://github.com/llvm/llvm-project/commit/96f1cd2427e472acf65e1b0b755a2c1f672e730b
  Author: Casey Carter <Casey at Carter.net>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M libcxx/test/std/ranges/range.factories/range.istream.view/utils.h

  Log Message:
  -----------
  [libc++][test] Silence MSVC warning

Our static analyzer likes to warn when loop bodies are never executed, which is true for `make_string<T>("")`. Build the result with `basic_string`'s iterator-pair constructor instead, which is simpler (one liner), faster (single pass), and doesn't trigger the warning.

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




More information about the All-commits mailing list