[PATCH] D97324: [NFC] Make TrailingObjects non-copyable/non-movable

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 23 16:30:23 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf4451eb4f38: [NFC] Make TrailingObjects non-copyable/non-movable (authored by erichkeane).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97324

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


Index: llvm/include/llvm/Support/TrailingObjects.h
===================================================================
--- llvm/include/llvm/Support/TrailingObjects.h
+++ llvm/include/llvm/Support/TrailingObjects.h
@@ -345,6 +345,12 @@
     return sizeof(BaseTy) + ParentType::additionalSizeToAllocImpl(0, Counts...);
   }
 
+  TrailingObjects() = default;
+  TrailingObjects(const TrailingObjects &) = delete;
+  TrailingObjects(TrailingObjects &&) = delete;
+  TrailingObjects &operator=(const TrailingObjects &) = delete;
+  TrailingObjects &operator=(TrailingObjects &&) = delete;
+
   /// A type where its ::with_counts template member has a ::type member
   /// suitable for use as uninitialized storage for an object with the given
   /// trailing object counts. The template arguments are similar to those


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97324.325934.patch
Type: text/x-patch
Size: 814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210224/9ad2f478/attachment-0001.bin>


More information about the cfe-commits mailing list