From: Aaron Ballman Date: Wed, 2 Dec 2015 15:05:47 +0000 (+0000) Subject: Amending r254423 by deleting the copy constructor and adding a move constructor inste... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6a102dd24002125b52364ea31372d4380791fb5;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254515 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/AttributeList.h b/include/clang/Sema/AttributeList.h index 7a84b20af2..95968e2100 100644 --- a/include/clang/Sema/AttributeList.h +++ b/include/clang/Sema/AttributeList.h @@ -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() {