[PATCH] D140955: Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 14:36:16 PST 2023


dblaikie added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:347
     const std::array<unsigned, 3> RegSrcOpIdx = { { 0, 2, 3 } };
-    return addMappingFromTable<3>(MI, MRI, RegSrcOpIdx, makeArrayRef(Table));
+    return addMappingFromTable<3>(MI, MRI, RegSrcOpIdx, ArrayRef(Table));
   }
----------------
mehdi_amini wrote:
> It seems that in such cases we can remove the explicit `ArrayRef(...)` around `Table` here right ?
> 
> (I wonder if a clang-tidy check could detect this maybe?)
Perhaps these would be considered pre-existing issues, since they could've been written the way you are suggesting even without CTAD for `ArrayRef` - but, yeah, if they can be simply cleaned up while doing this transformation, it'd be a perk/nice to have.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140955/new/

https://reviews.llvm.org/D140955



More information about the llvm-commits mailing list