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

Andrei Golubev via All-commits all-commits at lists.llvm.org
Mon Mar 25 14:48:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bce17034157fdfe4d898d30366c1eeca3442fa3d
      https://github.com/llvm/llvm-project/commit/bce17034157fdfe4d898d30366c1eeca3442fa3d
  Author: Andrei Golubev <andrey.golubev at intel.com>
  Date:   2024-03-25 (Mon, 25 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>



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