Merge pull request #13685 from ethereum/graph-naming-corrections

Graph naming corrections
This commit is contained in:
Daniel 2022-11-08 00:49:01 +01:00 committed by GitHub
commit ce18dddd20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 10 deletions

View File

@ -663,13 +663,13 @@ public:
UsingForDirective(
int64_t _id,
SourceLocation const& _location,
std::vector<ASTPointer<IdentifierPath>> _functions,
std::vector<ASTPointer<IdentifierPath>> _functionsOrLibrary,
bool _usesBraces,
ASTPointer<TypeName> _typeName,
bool _global
):
ASTNode(_id, _location),
m_functions(_functions),
m_functionsOrLibrary(std::move(_functionsOrLibrary)),
m_usesBraces(_usesBraces),
m_typeName(std::move(_typeName)),
m_global{_global}
@ -683,13 +683,13 @@ public:
TypeName const* typeName() const { return m_typeName.get(); }
/// @returns a list of functions or the single library.
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functions; }
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functionsOrLibrary; }
bool usesBraces() const { return m_usesBraces; }
bool global() const { return m_global; }
private:
/// Either the single library or a list of functions.
std::vector<ASTPointer<IdentifierPath>> m_functions;
std::vector<ASTPointer<IdentifierPath>> m_functionsOrLibrary;
bool m_usesBraces;
ASTPointer<TypeName> m_typeName;
bool m_global = false;

View File

@ -194,7 +194,7 @@ void UsingForDirective::accept(ASTVisitor& _visitor)
{
if (_visitor.visit(*this))
{
listAccept(functionsOrLibrary(), _visitor);
listAccept(m_functionsOrLibrary, _visitor);
if (m_typeName)
m_typeName->accept(_visitor);
}
@ -205,7 +205,7 @@ void UsingForDirective::accept(ASTConstVisitor& _visitor) const
{
if (_visitor.visit(*this))
{
listAccept(functionsOrLibrary(), _visitor);
listAccept(m_functionsOrLibrary, _visitor);
if (m_typeName)
m_typeName->accept(_visitor);
}

View File

@ -1673,7 +1673,7 @@ BOOST_AUTO_TEST_CASE(using_for)
contract C {
using L for S;
function test() public {
function pub() public {
S memory s = S(42);
s.ext();
@ -1693,8 +1693,8 @@ BOOST_AUTO_TEST_CASE(using_for)
{"Entry", "function L.ext(struct S)"},
}},
{"C", {
{"Entry", "function C.test()"},
{"function C.test()", "function L.inr(struct S)"},
{"Entry", "function C.pub()"},
{"function C.pub()", "function L.inr(struct S)"},
}},
};

View File

@ -6,5 +6,4 @@ contract C {
y;
}
}
// ---
// ----