Commit 6ffb49f0 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

duchain object classes: expl. delete copy-assignment operator

parent 2dea8fe2
......@@ -35,6 +35,8 @@ public:
, m_aliasedDeclaration(rhs.m_aliasedDeclaration)
{
}
AliasDeclarationData& operator=(const AliasDeclarationData& rhs) = delete;
IndexedDeclaration m_aliasedDeclaration;
};
/**
......@@ -60,6 +62,8 @@ public:
/// Destructor
~AliasDeclaration() override;
AliasDeclaration& operator=(const AliasDeclaration& rhs) = delete;
/**
* An AliasDeclaration cannot have a type, so setAbstractType does nothing here.
*
......
......@@ -79,6 +79,8 @@ public:
m_classModifier = rhs.m_classModifier;
}
ClassDeclarationData& operator=(const ClassDeclarationData& rhs) = delete;
/// Type of the class (struct, class, etc.)
ClassType m_classType;
/// Modifier of the class (final, abstract, etc.)
......
......@@ -61,6 +61,7 @@ public:
{
freeAppendedLists();
}
ClassFunctionDeclarationData& operator=(const ClassFunctionDeclarationData& rhs) = delete;
ClassFunctionFlags m_functionFlags;
START_APPENDED_LISTS_BASE(ClassFunctionDeclarationData, ClassMemberDeclarationData);
APPENDED_LIST_FIRST(ClassFunctionDeclarationData, IndexedString, m_defaultParameters);
......
......@@ -38,6 +38,8 @@ public:
explicit ClassMemberDeclaration(ClassMemberDeclarationData& dd);
~ClassMemberDeclaration() override;
ClassMemberDeclaration& operator=(const ClassMemberDeclaration& rhs) = delete;
AccessPolicy accessPolicy() const;
void setAccessPolicy(AccessPolicy accessPolicy);
......
......@@ -87,6 +87,8 @@ public:
/// Uses the given data
explicit Declaration(DeclarationData& dd);
Declaration& operator=(const Declaration& rhs) = delete;
TopDUContext* topContext() const override;
/**
......
......@@ -209,6 +209,8 @@ public:
freeAppendedLists();
}
EnvironmentInformationListItem& operator=(const EnvironmentInformationListItem& rhs) = delete;
unsigned int hash() const
{
//We only compare the declaration. This allows us implementing a map, although the item-repository
......
......@@ -75,6 +75,8 @@ public:
freeAppendedLists();
}
DUChainBaseData& operator=(const DUChainBaseData& rhs) = delete;
RangeInRevision m_range;
APPENDED_LISTS_STUB(DUChainBaseData)
......@@ -160,6 +162,8 @@ public:
explicit DUChainBase(DUChainBaseData& dd);
DUChainBase& operator=(const DUChainBase& rhs) = delete;
///This must only be used to change the storage-location or storage-kind(dynamic/constant) of the data, but
///the data must always be equal!
virtual void setData(DUChainBaseData*, bool constructorCalled = true);
......
......@@ -97,6 +97,8 @@ public:
*/
~DUContext() override;
DUContext& operator=(const DUContext& rhs) = delete;
enum ContextType : quint8 {
Global /**< A context that declares functions, namespaces or classes */,
Namespace /**< A context that declares namespace members */,
......
......@@ -35,6 +35,7 @@ public:
: DeclarationData(rhs)
{
}
ForwardDeclarationData& operator=(const ForwardDeclarationData& rhs) = delete;
};
/**
* Represents a forward declaration
......@@ -60,6 +61,8 @@ public:
/// Destructor.
~ForwardDeclaration() override;
ForwardDeclaration& operator=(const ForwardDeclaration& rhs) = delete;
bool isForwardDeclaration() const override;
/**
......
......@@ -49,6 +49,7 @@ public:
{
freeAppendedLists();
}
FunctionDeclarationData& operator=(const FunctionDeclarationData& rhs) = delete;
START_APPENDED_LISTS_BASE(FunctionDeclarationData, DeclarationData);
APPENDED_LIST_FIRST(FunctionDeclarationData, IndexedString, m_defaultParameters);
......@@ -68,6 +69,8 @@ public:
FunctionDeclaration(FunctionDeclarationData& data, const KDevelop::RangeInRevision&);
~FunctionDeclaration() override;
FunctionDeclaration& operator=(const FunctionDeclaration& rhs) = delete;
void setAbstractType(AbstractType::Ptr type) override;
QString toString() const override;
......
......@@ -40,6 +40,8 @@ public:
explicit FunctionDefinition(FunctionDefinitionData& data);
~FunctionDefinition() override;
FunctionDefinition& operator=(const FunctionDefinition& rhs) = delete;
/**
* Find the declaration for this definition, if one exists.
*
......
......@@ -33,6 +33,7 @@ public:
, m_importIdentifier(rhs.m_importIdentifier)
{
}
NamespaceAliasDeclarationData& operator=(const NamespaceAliasDeclarationData& rhs) = delete;
IndexedQualifiedIdentifier m_importIdentifier; //The identifier that was imported
};
/**
......@@ -57,6 +58,9 @@ public:
explicit NamespaceAliasDeclaration(NamespaceAliasDeclarationData& data);
~NamespaceAliasDeclaration() override;
NamespaceAliasDeclaration& operator=(const NamespaceAliasDeclaration& rhs) = delete;
///A NamespaceAliasDeclaration cannot have a type, so setAbstractType does nothing here.
void setAbstractType(AbstractType::Ptr type) override;
......
......@@ -125,6 +125,8 @@ public:
ParsingEnvironmentFile(ParsingEnvironmentFileData& data, const IndexedString& url);
explicit ParsingEnvironmentFile(ParsingEnvironmentFileData& data);
ParsingEnvironmentFile& operator=(const ParsingEnvironmentFile& rhs) = delete;
///@see ParsingEnvironmentType
virtual int type() const;
......
......@@ -104,6 +104,8 @@ public:
freeAppendedLists();
}
ProblemData& operator=(const ProblemData& rhs) = delete;
IProblem::Source source = IProblem::Unknown;
IProblem::Severity severity = IProblem::Error;
IndexedString url;
......
......@@ -118,6 +118,8 @@ public:
ParsingEnvironmentFile* file = nullptr);
explicit TopDUContext(TopDUContextData& data);
TopDUContext& operator=(const TopDUContext& rhs) = delete;
TopDUContext* topContext() const override;
///Returns an indexed representation of this top-context. Indexed representations stay valid even if the top-context is unloaded.
......
......@@ -62,6 +62,8 @@ public:
freeAppendedLists();
}
TopDUContextData& operator=(const TopDUContextData& rhs) = delete;
TopDUContext::Features m_features;
IndexedString m_url;
......
......@@ -48,6 +48,8 @@ public:
freeAppendedLists();
}
MacroDefinitionData& operator=(const MacroDefinitionData& rhs) = delete;
IndexedString definition;
bool isFunctionLike : 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment