mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2825 from ethereum/contract-unused-natspec
Removed unused natspec members of ContractDefinition
This commit is contained in:
commit
5bd6254449
@ -218,26 +218,6 @@ vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::inter
|
|||||||
return *m_interfaceFunctionList;
|
return *m_interfaceFunctionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
Json::Value const& ContractDefinition::devDocumentation() const
|
|
||||||
{
|
|
||||||
return m_devDocumentation;
|
|
||||||
}
|
|
||||||
|
|
||||||
Json::Value const& ContractDefinition::userDocumentation() const
|
|
||||||
{
|
|
||||||
return m_userDocumentation;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContractDefinition::setDevDocumentation(Json::Value const& _devDocumentation)
|
|
||||||
{
|
|
||||||
m_devDocumentation = _devDocumentation;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ContractDefinition::setUserDocumentation(Json::Value const& _userDocumentation)
|
|
||||||
{
|
|
||||||
m_userDocumentation = _userDocumentation;
|
|
||||||
}
|
|
||||||
|
|
||||||
vector<Declaration const*> const& ContractDefinition::inheritableMembers() const
|
vector<Declaration const*> const& ContractDefinition::inheritableMembers() const
|
||||||
{
|
{
|
||||||
if (!m_inheritableMembers)
|
if (!m_inheritableMembers)
|
||||||
|
@ -392,12 +392,6 @@ public:
|
|||||||
/// Returns the fallback function or nullptr if no fallback function was specified.
|
/// Returns the fallback function or nullptr if no fallback function was specified.
|
||||||
FunctionDefinition const* fallbackFunction() const;
|
FunctionDefinition const* fallbackFunction() const;
|
||||||
|
|
||||||
Json::Value const& userDocumentation() const;
|
|
||||||
void setUserDocumentation(Json::Value const& _userDocumentation);
|
|
||||||
|
|
||||||
Json::Value const& devDocumentation() const;
|
|
||||||
void setDevDocumentation(Json::Value const& _devDocumentation);
|
|
||||||
|
|
||||||
virtual TypePointer type() const override;
|
virtual TypePointer type() const override;
|
||||||
|
|
||||||
virtual ContractDefinitionAnnotation& annotation() const override;
|
virtual ContractDefinitionAnnotation& annotation() const override;
|
||||||
@ -409,10 +403,6 @@ private:
|
|||||||
std::vector<ASTPointer<ASTNode>> m_subNodes;
|
std::vector<ASTPointer<ASTNode>> m_subNodes;
|
||||||
ContractKind m_contractKind;
|
ContractKind m_contractKind;
|
||||||
|
|
||||||
// parsed Natspec documentation of the contract.
|
|
||||||
Json::Value m_userDocumentation;
|
|
||||||
Json::Value m_devDocumentation;
|
|
||||||
|
|
||||||
std::vector<ContractDefinition const*> m_linearizedBaseContracts;
|
std::vector<ContractDefinition const*> m_linearizedBaseContracts;
|
||||||
mutable std::unique_ptr<std::vector<std::pair<FixedHash<4>, FunctionTypePointer>>> m_interfaceFunctionList;
|
mutable std::unique_ptr<std::vector<std::pair<FixedHash<4>, FunctionTypePointer>>> m_interfaceFunctionList;
|
||||||
mutable std::unique_ptr<std::vector<EventDefinition const*>> m_interfaceEvents;
|
mutable std::unique_ptr<std::vector<EventDefinition const*>> m_interfaceEvents;
|
||||||
|
@ -188,9 +188,6 @@ bool CompilerStack::analyze()
|
|||||||
if (!resolver.updateDeclaration(*m_globalContext->currentSuper())) return false;
|
if (!resolver.updateDeclaration(*m_globalContext->currentSuper())) return false;
|
||||||
if (!resolver.resolveNamesAndTypes(*contract)) return false;
|
if (!resolver.resolveNamesAndTypes(*contract)) return false;
|
||||||
|
|
||||||
contract->setDevDocumentation(Natspec::devDocumentation(*contract));
|
|
||||||
contract->setUserDocumentation(Natspec::userDocumentation(*contract));
|
|
||||||
|
|
||||||
// Note that we now reference contracts by their fully qualified names, and
|
// Note that we now reference contracts by their fully qualified names, and
|
||||||
// thus contracts can only conflict if declared in the same source file. This
|
// thus contracts can only conflict if declared in the same source file. This
|
||||||
// already causes a double-declaration error elsewhere, so we do not report
|
// already causes a double-declaration error elsewhere, so we do not report
|
||||||
|
Loading…
Reference in New Issue
Block a user