Skip to content

Commit ce18ddd

Browse files
authored
Merge pull request #13685 from ethereum/graph-naming-corrections
Graph naming corrections
2 parents b66cea1 + df1f5ee commit ce18ddd

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

libsolidity/ast/AST.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,13 @@ class UsingForDirective: public ASTNode
663663
UsingForDirective(
664664
int64_t _id,
665665
SourceLocation const& _location,
666-
std::vector<ASTPointer<IdentifierPath>> _functions,
666+
std::vector<ASTPointer<IdentifierPath>> _functionsOrLibrary,
667667
bool _usesBraces,
668668
ASTPointer<TypeName> _typeName,
669669
bool _global
670670
):
671671
ASTNode(_id, _location),
672-
m_functions(_functions),
672+
m_functionsOrLibrary(std::move(_functionsOrLibrary)),
673673
m_usesBraces(_usesBraces),
674674
m_typeName(std::move(_typeName)),
675675
m_global{_global}
@@ -683,13 +683,13 @@ class UsingForDirective: public ASTNode
683683
TypeName const* typeName() const { return m_typeName.get(); }
684684

685685
/// @returns a list of functions or the single library.
686-
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functions; }
686+
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functionsOrLibrary; }
687687
bool usesBraces() const { return m_usesBraces; }
688688
bool global() const { return m_global; }
689689

690690
private:
691691
/// Either the single library or a list of functions.
692-
std::vector<ASTPointer<IdentifierPath>> m_functions;
692+
std::vector<ASTPointer<IdentifierPath>> m_functionsOrLibrary;
693693
bool m_usesBraces;
694694
ASTPointer<TypeName> m_typeName;
695695
bool m_global = false;

libsolidity/ast/AST_accept.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void UsingForDirective::accept(ASTVisitor& _visitor)
194194
{
195195
if (_visitor.visit(*this))
196196
{
197-
listAccept(functionsOrLibrary(), _visitor);
197+
listAccept(m_functionsOrLibrary, _visitor);
198198
if (m_typeName)
199199
m_typeName->accept(_visitor);
200200
}
@@ -205,7 +205,7 @@ void UsingForDirective::accept(ASTConstVisitor& _visitor) const
205205
{
206206
if (_visitor.visit(*this))
207207
{
208-
listAccept(functionsOrLibrary(), _visitor);
208+
listAccept(m_functionsOrLibrary, _visitor);
209209
if (m_typeName)
210210
m_typeName->accept(_visitor);
211211
}

test/libsolidity/analysis/FunctionCallGraph.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ BOOST_AUTO_TEST_CASE(using_for)
16731673
contract C {
16741674
using L for S;
16751675
1676-
function test() public {
1676+
function pub() public {
16771677
S memory s = S(42);
16781678
16791679
s.ext();
@@ -1693,8 +1693,8 @@ BOOST_AUTO_TEST_CASE(using_for)
16931693
{"Entry", "function L.ext(struct S)"},
16941694
}},
16951695
{"C", {
1696-
{"Entry", "function C.test()"},
1697-
{"function C.test()", "function L.inr(struct S)"},
1696+
{"Entry", "function C.pub()"},
1697+
{"function C.pub()", "function L.inr(struct S)"},
16981698
}},
16991699
};
17001700

test/libsolidity/syntaxTests/controlFlow/localStorageVariables/ternary_assignment_fine.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ contract C {
66
y;
77
}
88
}
9-
// ---
109
// ----

0 commit comments

Comments
 (0)