[PATCH] D108124: Fix type in DenseMap<SmallBitVector, *> to match V.size()

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 07:30:45 PDT 2021


rengolin added a comment.

This is the warning:

  include\llvm/ADT/SmallBitVector.h(725): note: see reference to function template instantiation 'std::pair<unsigned int,llvm::ArrayRef<uint64_t>>::pair<unsigned __int64,llvm::ArrayRef<uint64_t>,0>(std::pair<unsigned __int64,llvm::ArrayRef<uint64_t>> &&) noexcept' being compiled
  include\llvm/ADT/SmallBitVector.h(724): note: see reference to function template instantiation 'std::pair<unsigned int,llvm::ArrayRef<uint64_t>>::pair<unsigned __int64,llvm::ArrayRef<uint64_t>,0>(std::pair<unsigned __int64,llvm::ArrayRef<uint64_t>> &&) noexcept' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\include\utility(249): warning C4244: 'initializing': conversion from '_Ty' to '_Ty1', possible loss of data
      with
      [
          _Ty=uint64_t
      ]
      and
      [
          _Ty1=unsigned int
      ]

Newer versions of MSCV find even more of those on both Clang (AST, Sema, Loc) and LLVM (Support, ADT). I've checked a few and they're all legitimate type mismatches.

But fixing them is as unwinding as this one, because there's a lot of (LLVM) user code that makes the same assumptions (ex. `unsigned` == `size_t`) and we'd need to chain all assumptions down to all users.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108124/new/

https://reviews.llvm.org/D108124



More information about the llvm-commits mailing list