[all-commits] [llvm/llvm-project] 5e8ed8: [mlir] Fix non-const lvalue reference to type 'uin...

Jie Fu via All-commits all-commits at lists.llvm.org
Fri May 26 18:54:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e8ed850d31cf18325f674d953dabf22549b85da
      https://github.com/llvm/llvm-project/commit/5e8ed850d31cf18325f674d953dabf22549b85da
  Author: Jie Fu <jiefu at tencent.com>
  Date:   2023-05-27 (Sat, 27 May 2023)

  Changed paths:
    M mlir/lib/Bytecode/Reader/BytecodeReader.cpp

  Log Message:
  -----------
  [mlir] Fix non-const lvalue reference to type 'uint64_t' cannot bind to type 'size_t' error (NFC)

/Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:1007:39: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned long')
    if (failed(propReader.parseVarInt(count)))
                                      ^~~~~
/Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:191:39: note: passing argument to parameter 'result' here
  LogicalResult parseVarInt(uint64_t &result) {
                                      ^
/Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:1020:44: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned long')
      if (failed(offsetsReader.parseVarInt(dataSize)) ||
                                           ^~~~~~~~
/Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:191:39: note: passing argument to parameter 'result' here
  LogicalResult parseVarInt(uint64_t &result) {
                                      ^
2 errors generated.




More information about the All-commits mailing list