зеркало из https://github.com/microsoft/clang-1.git
Mark unimplemented copy constructors and copy assignment operators with LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
4b0824229b
Коммит
be2fa7ebf0
|
@ -578,8 +578,8 @@ struct QualifierInfo {
|
|||
|
||||
private:
|
||||
// Copy constructor and copy assignment are disabled.
|
||||
QualifierInfo(const QualifierInfo&);
|
||||
QualifierInfo& operator=(const QualifierInfo&);
|
||||
QualifierInfo(const QualifierInfo&) LLVM_DELETED_FUNCTION;
|
||||
QualifierInfo& operator=(const QualifierInfo&) LLVM_DELETED_FUNCTION;
|
||||
};
|
||||
|
||||
/// \brief Represents a ValueDecl that came out of a declarator.
|
||||
|
|
|
@ -149,8 +149,8 @@ class TemplateArgumentList {
|
|||
/// argument list.
|
||||
unsigned NumArguments;
|
||||
|
||||
TemplateArgumentList(const TemplateArgumentList &Other); // DO NOT IMPL
|
||||
void operator=(const TemplateArgumentList &Other); // DO NOT IMPL
|
||||
TemplateArgumentList(const TemplateArgumentList &Other) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const TemplateArgumentList &Other) LLVM_DELETED_FUNCTION;
|
||||
|
||||
TemplateArgumentList(const TemplateArgument *Args, unsigned NumArgs,
|
||||
bool Owned)
|
||||
|
|
|
@ -334,8 +334,8 @@ class DeclarationNameTable {
|
|||
CXXOperatorIdName *CXXOperatorNames; // Operator names
|
||||
void *CXXLiteralOperatorNames; // Actually a CXXOperatorIdName*
|
||||
|
||||
DeclarationNameTable(const DeclarationNameTable&); // NONCOPYABLE
|
||||
DeclarationNameTable& operator=(const DeclarationNameTable&); // NONCOPYABLE
|
||||
DeclarationNameTable(const DeclarationNameTable&) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const DeclarationNameTable&) LLVM_DELETED_FUNCTION;
|
||||
|
||||
public:
|
||||
DeclarationNameTable(const ASTContext &C);
|
||||
|
|
|
@ -97,8 +97,7 @@ private:
|
|||
Specifier(Other.Specifier) {
|
||||
}
|
||||
|
||||
NestedNameSpecifier &operator=(const NestedNameSpecifier &); // do not
|
||||
// implement
|
||||
void operator=(const NestedNameSpecifier &) LLVM_DELETED_FUNCTION;
|
||||
|
||||
/// \brief Either find or insert the given nested name specifier
|
||||
/// mockup in the given context.
|
||||
|
|
|
@ -94,7 +94,7 @@ class UnresolvedSetImpl {
|
|||
private:
|
||||
template <unsigned N> friend class UnresolvedSet;
|
||||
UnresolvedSetImpl() {}
|
||||
UnresolvedSetImpl(const UnresolvedSetImpl &) {}
|
||||
UnresolvedSetImpl(const UnresolvedSetImpl &) LLVM_DELETED_FUNCTION;
|
||||
|
||||
public:
|
||||
// We don't currently support assignment through this iterator, so we might
|
||||
|
|
|
@ -75,8 +75,8 @@ class IdentifierInfo {
|
|||
void *FETokenInfo; // Managed by the language front-end.
|
||||
llvm::StringMapEntry<IdentifierInfo*> *Entry;
|
||||
|
||||
IdentifierInfo(const IdentifierInfo&); // NONCOPYABLE.
|
||||
void operator=(const IdentifierInfo&); // NONASSIGNABLE.
|
||||
IdentifierInfo(const IdentifierInfo&) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const IdentifierInfo&) LLVM_DELETED_FUNCTION;
|
||||
|
||||
friend class IdentifierTable;
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ namespace SrcMgr {
|
|||
|
||||
private:
|
||||
// Disable assignments.
|
||||
ContentCache &operator=(const ContentCache& RHS);
|
||||
ContentCache &operator=(const ContentCache& RHS) LLVM_DELETED_FUNCTION;
|
||||
};
|
||||
|
||||
/// \brief Information about a FileID, basically just the logical file
|
||||
|
@ -647,8 +647,8 @@ class SourceManager : public RefCountedBase<SourceManager> {
|
|||
mutable llvm::DenseMap<FileID, MacroArgsMap *> MacroArgsCacheMap;
|
||||
|
||||
// SourceManager doesn't support copy construction.
|
||||
explicit SourceManager(const SourceManager&);
|
||||
void operator=(const SourceManager&);
|
||||
explicit SourceManager(const SourceManager&) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const SourceManager&) LLVM_DELETED_FUNCTION;
|
||||
public:
|
||||
SourceManager(DiagnosticsEngine &Diag, FileManager &FileMgr,
|
||||
bool UserFilesAreVolatile = false);
|
||||
|
|
|
@ -207,9 +207,8 @@ class HeaderSearch {
|
|||
unsigned NumFrameworkLookups, NumSubFrameworkLookups;
|
||||
|
||||
// HeaderSearch doesn't support default or copy construction.
|
||||
explicit HeaderSearch();
|
||||
explicit HeaderSearch(const HeaderSearch&);
|
||||
void operator=(const HeaderSearch&);
|
||||
HeaderSearch(const HeaderSearch&) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const HeaderSearch&) LLVM_DELETED_FUNCTION;
|
||||
|
||||
friend class DirectoryLookup;
|
||||
|
||||
|
|
|
@ -140,10 +140,10 @@ private:
|
|||
return *reinterpret_cast<const TypeTagForDatatypeData *>(this + 1);
|
||||
}
|
||||
|
||||
AttributeList(const AttributeList &); // DO NOT IMPLEMENT
|
||||
void operator=(const AttributeList &); // DO NOT IMPLEMENT
|
||||
void operator delete(void *); // DO NOT IMPLEMENT
|
||||
~AttributeList(); // DO NOT IMPLEMENT
|
||||
AttributeList(const AttributeList &) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const AttributeList &) LLVM_DELETED_FUNCTION;
|
||||
void operator delete(void *) LLVM_DELETED_FUNCTION;
|
||||
~AttributeList() LLVM_DELETED_FUNCTION;
|
||||
|
||||
size_t allocated_size() const;
|
||||
|
||||
|
|
|
@ -748,8 +748,8 @@ namespace clang {
|
|||
unsigned NumInlineSequences;
|
||||
char InlineSpace[16 * sizeof(ImplicitConversionSequence)];
|
||||
|
||||
OverloadCandidateSet(const OverloadCandidateSet &);
|
||||
OverloadCandidateSet &operator=(const OverloadCandidateSet &);
|
||||
OverloadCandidateSet(const OverloadCandidateSet &) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const OverloadCandidateSet &) LLVM_DELETED_FUNCTION;
|
||||
|
||||
public:
|
||||
OverloadCandidateSet(SourceLocation Loc) : Loc(Loc), NumInlineSequences(0){}
|
||||
|
|
|
@ -5717,10 +5717,10 @@ public:
|
|||
bool CheckInstantiationDepth(SourceLocation PointOfInstantiation,
|
||||
SourceRange InstantiationRange);
|
||||
|
||||
InstantiatingTemplate(const InstantiatingTemplate&); // not implemented
|
||||
InstantiatingTemplate(const InstantiatingTemplate&) LLVM_DELETED_FUNCTION;
|
||||
|
||||
InstantiatingTemplate&
|
||||
operator=(const InstantiatingTemplate&); // not implemented
|
||||
operator=(const InstantiatingTemplate&) LLVM_DELETED_FUNCTION;
|
||||
};
|
||||
|
||||
void PrintInstantiationStack();
|
||||
|
|
|
@ -239,8 +239,9 @@ namespace clang {
|
|||
unsigned NumArgsInPartiallySubstitutedPack;
|
||||
|
||||
// This class is non-copyable
|
||||
LocalInstantiationScope(const LocalInstantiationScope &);
|
||||
LocalInstantiationScope &operator=(const LocalInstantiationScope &);
|
||||
LocalInstantiationScope(
|
||||
const LocalInstantiationScope &) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const LocalInstantiationScope &) LLVM_DELETED_FUNCTION;
|
||||
|
||||
public:
|
||||
LocalInstantiationScope(Sema &SemaRef, bool CombineWithOuterScope = false)
|
||||
|
|
|
@ -322,10 +322,9 @@ private:
|
|||
const DisplayHint Hint;
|
||||
std::vector<SourceRange> ranges;
|
||||
|
||||
// Do not implement:
|
||||
PathDiagnosticPiece();
|
||||
PathDiagnosticPiece(const PathDiagnosticPiece &P);
|
||||
PathDiagnosticPiece& operator=(const PathDiagnosticPiece &P);
|
||||
PathDiagnosticPiece() LLVM_DELETED_FUNCTION;
|
||||
PathDiagnosticPiece(const PathDiagnosticPiece &P) LLVM_DELETED_FUNCTION;
|
||||
void operator=(const PathDiagnosticPiece &P) LLVM_DELETED_FUNCTION;
|
||||
|
||||
protected:
|
||||
PathDiagnosticPiece(StringRef s, Kind k, DisplayHint hint = Below);
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
typedef llvm::ImmutableMap<void*, void*> GenericDataMap;
|
||||
|
||||
private:
|
||||
void operator=(const ProgramState& R) const; // Do not implement.
|
||||
void operator=(const ProgramState& R) LLVM_DELETED_FUNCTION;
|
||||
|
||||
friend class ProgramStateManager;
|
||||
friend class ExplodedGraph;
|
||||
|
|
Загрузка…
Ссылка в новой задаче