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