<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57275>57275</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Fails to build with `non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned int')`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            build-problem
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          sylvestre
      </td>
    </tr>
</table>

<pre>
    on i386 linux:

Recent (today) regression:
```

FAILED: tools/mlir/lib/Bytecode/Reader/CMakeFiles/obj.MLIRBytecodeReader.dir/BytecodeReader.cpp.o 
"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/build-llvm/./bin/clang++" -DMLIR_CUDA_CONVERSIONS_ENABLED=1 -DMLIR_ROCM_CONVERSIONS_ENABLED=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/build-llvm/tools/clang/stage2-bins/tools/mlir/lib/Bytecode/Reader" -I"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/mlir/lib/Bytecode/Reader" -I"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/build-llvm/tools/clang/stage2-bins/include" -I"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/llvm/include" -I"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/mlir/include" -I"/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/build-llvm/tools/clang/stage2-bins/tools/mlir/include" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/= -no-canonical-prefixes -Werror=mismatched-tags -Werror=global-constructors -O2 -DNDEBUG -g1  -fno-exceptions -std=c++17 -MD -MT tools/mlir/lib/Bytecode/Reader/CMakeFiles/obj.MLIRBytecodeReader.dir/BytecodeReader.cpp.o -MF tools/mlir/lib/Bytecode/Reader/CMakeFiles/obj.MLIRBytecodeReader.dir/BytecodeReader.cpp.o.d -o tools/mlir/lib/Bytecode/Reader/CMakeFiles/obj.MLIRBytecodeReader.dir/BytecodeReader.cpp.o -c '/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/mlir/lib/Bytecode/Reader/BytecodeReader.cpp'
/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:169:60: 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 int')
    if (failed(parseByte(sectionID)) || failed(parseVarInt(length)))
                                                           ^~~~~~
/build/llvm-toolchain-snapshot-16~++20220822111541+3c482632e64c/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:110:39: note: passing argument to parameter 'result' here
  LogicalResult parseVarInt(uint64_t &result) {
                                      ^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src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