r206404 - Minor cleanups for deleted functions to ensure they're a bit more robustly "deleted".
Aaron Ballman
aaron at aaronballman.com
Wed Apr 16 10:20:26 PDT 2014
Author: aaronballman
Date: Wed Apr 16 12:20:26 2014
New Revision: 206404
URL: http://llvm.org/viewvc/llvm-project?rev=206404&view=rev
Log:
Minor cleanups for deleted functions to ensure they're a bit more robustly "deleted".
Modified:
cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyUtil.h
Modified: cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyUtil.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyUtil.h?rev=206404&r1=206403&r2=206404&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyUtil.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/ThreadSafetyUtil.h Wed Apr 16 12:20:26 2014
@@ -139,7 +139,7 @@ public:
}
private:
- SimpleArray(const SimpleArray<T> &A) { }
+ SimpleArray(const SimpleArray<T> &A) LLVM_DELETED_FUNCTION;
T *Data;
size_t Size;
@@ -157,7 +157,6 @@ private:
// The init(), destroy(), and makeWritable() methods will change state.
template<typename T>
class CopyOnWriteVector {
-private:
class VectorData {
public:
VectorData() : NumRefs(1) { }
@@ -167,9 +166,10 @@ private:
std::vector<T> Vect;
};
+ CopyOnWriteVector(const CopyOnWriteVector &V) LLVM_DELETED_FUNCTION;
+
public:
CopyOnWriteVector() : Data(0) {}
- CopyOnWriteVector(const CopyOnWriteVector &V) LLVM_DELETED_FUNCTION;
CopyOnWriteVector(CopyOnWriteVector &&V) : Data(V.Data) { V.Data = 0; }
~CopyOnWriteVector() { destroy(); }
More information about the cfe-commits
mailing list