From 1a8564545eb27849007b79511ef5d40ec5ce0a37 Mon Sep 17 00:00:00 2001 From: wechman Date: Thu, 1 Sep 2022 10:06:41 +0200 Subject: [PATCH] Minor fixes after code review --- libsolidity/analysis/ControlFlowGraph.h | 1 - libsolidity/ast/Types.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libsolidity/analysis/ControlFlowGraph.h b/libsolidity/analysis/ControlFlowGraph.h index 7419e6910..64da66028 100644 --- a/libsolidity/analysis/ControlFlowGraph.h +++ b/libsolidity/analysis/ControlFlowGraph.h @@ -29,7 +29,6 @@ #include #include #include -#include namespace solidity::frontend { diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 4adb1ffc7..cc6f30198 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -452,15 +452,15 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ASTNode const& _sc }; for (UsingForDirective const* ufd: usingForDirectivesForType(_type, _scope)) - for (auto const& [pathPointer, operator_]: ufd->functionsAndOperators()) + for (auto const& [identifierPath, operator_]: ufd->functionsAndOperators()) { if (operator_.has_value()) // Functions used to define operators are not bound to the type. // I.e. `using {f} for T` allows `T x; x.f()` but `using {f as +} for T` does not. continue; - solAssert(pathPointer); - Declaration const* declaration = pathPointer->annotation().referencedDeclaration; + solAssert(identifierPath); + Declaration const* declaration = identifierPath->annotation().referencedDeclaration; solAssert(declaration); if (ContractDefinition const* library = dynamic_cast(declaration)) @@ -476,7 +476,7 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ASTNode const& _sc else addFunction( dynamic_cast(*declaration), - pathPointer->path().back() + identifierPath->path().back() ); }