r254515 - Amending r254423 by deleting the copy constructor and adding a move constructor instead; NFC as neither of these constructors are currently called, but this is a safer design.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 07:05:47 PST 2015


Author: aaronballman
Date: Wed Dec  2 09:05:47 2015
New Revision: 254515

URL: http://llvm.org/viewvc/llvm-project?rev=254515&view=rev
Log:
Amending r254423 by deleting the copy constructor and adding a move constructor instead; NFC as neither of these constructors are currently called, but this is a safer design.

Modified:
    cfe/trunk/include/clang/Sema/AttributeList.h

Modified: cfe/trunk/include/clang/Sema/AttributeList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/AttributeList.h?rev=254515&r1=254514&r2=254515&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/AttributeList.h (original)
+++ cfe/trunk/include/clang/Sema/AttributeList.h Wed Dec  2 09:05:47 2015
@@ -557,6 +557,13 @@ public:
   /// Create a new pool for a factory.
   AttributePool(AttributeFactory &factory) : Factory(factory), Head(nullptr) {}
 
+  AttributePool(AttributePool &) = delete;
+
+  /// Move the given pool's allocations to this pool.
+  AttributePool(AttributePool &&pool) : Factory(pool.Factory), Head(pool.Head) {
+    pool.Head = nullptr;
+  }
+
   AttributeFactory &getFactory() const { return Factory; }
 
   void clear() {




More information about the cfe-commits mailing list