[mlir] Silence warnings when building with Clang ToT
authorAlexandre Ganea <alex_toresh@yahoo.fr>
Tue, 5 Jul 2022 16:15:36 +0000 (12:15 -0400)
committerAlexandre Ganea <alex_toresh@yahoo.fr>
Wed, 6 Jul 2022 00:31:53 +0000 (20:31 -0400)
commitdb3013d684ddff31a7ee97b2ba499eac29ac8704
treeac534eb9c4f13affa4c6ac9789d6f720c8aa7508
parent92edd74b37c7a96b1d47dc67cda7f92b65066025
[mlir] Silence warnings when building with Clang ToT

Previously, these warnings were seen:

[6599/7564] Building native mlir-pdll...
[270/278] Building CXX object tools/mlir/lib/Tools/PDLL/CodeGen/CMakeFiles/obj.MLIRPDLLCodeGen.dir/CPPGen.cpp.obj
In file included from C:/git/llvm-project/mlir/lib/Tools/PDLL/CodeGen/CPPGen.cpp:20:
C:/git/llvm-project/mlir/include\mlir/Tools/PDLL/ODS/Operation.h(202,16): warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]
  friend class Dialect;
               ^
               ::mlir::
1 warning generated.

[278/278] Linking CXX executable bin\mlir-pdll.exe
[6857/7564] Building CXX object tools/mlir/unittests/ExecutionEngine/CMakeFiles/MLIRExecutionEngineTests.dir/Invoke.cpp.obj
In file included from C:/git/llvm-project/mlir/unittests/ExecutionEngine/Invoke.cpp:20:
C:/git/llvm-project/mlir/include\mlir/ExecutionEngine/MemRefUtils.h(104,27): warning: shift count >= width of type [-Wshift-count-overflow]
  assert(sizeof(T) < (1ul << 32) && "Elemental type overflows");
                          ^  ~~
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\assert.h(40,17): note: expanded from macro 'assert'
            (!!(expression)) ||                                                              \
                ^~~~~~~~~~
1 warning generated.
mlir/include/mlir/ExecutionEngine/MemRefUtils.h
mlir/include/mlir/Tools/PDLL/ODS/Operation.h