[PATCH] D143873: [NFC] [llvm] Forward forwarding reference pack

Chris Cotter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 12 20:19:48 PST 2023


ccotter created this revision.
Herald added a project: All.
ccotter requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Forward the forwarding reference in HashBuilder. I spotted
this while authoring a clang-tidy tool for CppCoreGuideline F.19


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143873

Files:
  llvm/include/llvm/Support/HashBuilder.h


Index: llvm/include/llvm/Support/HashBuilder.h
===================================================================
--- llvm/include/llvm/Support/HashBuilder.h
+++ llvm/include/llvm/Support/HashBuilder.h
@@ -100,7 +100,7 @@
       : HashBuilderBase<HasherT>(Hasher) {}
   template <typename... ArgTypes>
   explicit HashBuilderImpl(ArgTypes &&...Args)
-      : HashBuilderBase<HasherT>(Args...) {}
+      : HashBuilderBase<HasherT>(std::forward<ArgTypes>(Args)...) {}
 
   /// Implement hashing for hashable data types, e.g. integral or enum values.
   template <typename T>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143873.496831.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230213/2d9e3bf7/attachment.bin>


More information about the llvm-commits mailing list