[llvm] [ADT] Add a missing call to a unique_function destructor after move (PR #98747)

Dmitry Yanovsky via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 02:57:58 PDT 2024


================
@@ -12,15 +12,16 @@
 namespace llvm {
 
 struct CountCopyAndMove {
+  static int Constructions;
   static int CopyConstructions;
   static int CopyAssignments;
   static int MoveConstructions;
   static int MoveAssignments;
   static int Destructions;
   int val;
 
-  CountCopyAndMove() = default;
-  explicit CountCopyAndMove(int val) : val(val) {}
+  CountCopyAndMove() { ++Constructions; }
----------------
kerambyte wrote:

Sorry for the delay, yeah that works just fine, updated the names 👍 

https://github.com/llvm/llvm-project/pull/98747


More information about the llvm-commits mailing list