[all-commits] [llvm/llvm-project] 7c7c3d: [ODS][NFC] Cast range.size() to int32_t in accumul...

Andrei Golubev via All-commits all-commits at lists.llvm.org
Wed Mar 27 16:15:28 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c7c3d4a3a278f70b82b4edf5bad8915d929c97d
      https://github.com/llvm/llvm-project/commit/7c7c3d4a3a278f70b82b4edf5bad8915d929c97d
  Author: Andrei Golubev <andrey.golubev at intel.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [ODS][NFC] Cast range.size() to int32_t in accumulation (#85629)

Using range.size() "as is" means we accumulate 'size_t' values into
'int32_t' variable. This may produce narrowing conversion warnings
(particularly, on MSVC). The surrounding code seems to cast <x>.size()
to 'int32_t' so following this practice seems safe enough.

Co-authored-by: Ovidiu Pintican <ovidiu.pintican at intel.com>
(cherry picked from commit bce17034157fdfe4d898d30366c1eeca3442fa3d)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list