Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libsolidity/analysis/ControlFlowBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ControlFlowBuilder: private ASTConstVisitor, private yul::ASTWalker

CFGNode* newLabel();
CFGNode* createLabelHere();
void placeAndConnectLabel(CFGNode *_node);
void placeAndConnectLabel(CFGNode* _node);

CFG::NodeContainer& m_nodeContainer;

Expand Down
2 changes: 1 addition & 1 deletion libsolidity/analysis/TypeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ void TypeChecker::checkExpressionAssignment(Type const& _type, Expression const&
{
bool isLocalOrReturn = false;
if (auto const* identifier = dynamic_cast<Identifier const*>(&_expression))
if (auto const *variableDeclaration = dynamic_cast<VariableDeclaration const*>(identifier->annotation().referencedDeclaration))
if (auto const* variableDeclaration = dynamic_cast<VariableDeclaration const*>(identifier->annotation().referencedDeclaration))
if (variableDeclaration->isLocalOrReturn())
isLocalOrReturn = true;
if (!isLocalOrReturn)
Expand Down
2 changes: 1 addition & 1 deletion libsolidity/ast/Types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3474,7 +3474,7 @@ MemberList::MemberMap FunctionType::nativeMembers(ASTNode const* _scope) const
if (auto const* functionDefinition = dynamic_cast<FunctionDefinition const*>(m_declaration))
{
solAssert(functionDefinition->visibility() > Visibility::Internal, "");
auto const *contract = dynamic_cast<ContractDefinition const*>(m_declaration->scope());
auto const* contract = dynamic_cast<ContractDefinition const*>(m_declaration->scope());
solAssert(contract, "");
solAssert(contract->isLibrary(), "");
return {{"selector", TypeProvider::fixedBytes(4)}};
Expand Down
2 changes: 1 addition & 1 deletion libsolidity/codegen/CompilerContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class CompilerContext
/// Stack of current visited AST nodes, used for location attachment
std::stack<ASTNode const*> m_visitedNodes;
/// The runtime context if in Creation mode, this is used for generating tags that would be stored into the storage and then used at runtime.
CompilerContext *m_runtimeContext;
CompilerContext* m_runtimeContext;
/// The index of the runtime subroutine.
evmasm::SubAssemblyID m_runtimeSub{};
/// An index of low-level function labels by name.
Expand Down
2 changes: 1 addition & 1 deletion libsolidity/codegen/ExpressionCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,7 @@ bool ExpressionCompiler::visit(IndexRangeAccess const& _indexAccess)

Type const& baseType = *_indexAccess.baseExpression().annotation().type;

ArrayType const *arrayType = dynamic_cast<ArrayType const*>(&baseType);
ArrayType const* arrayType = dynamic_cast<ArrayType const*>(&baseType);
if (!arrayType)
if (ArraySliceType const* sliceType = dynamic_cast<ArraySliceType const*>(&baseType))
arrayType = &sliceType->arrayType();
Expand Down
2 changes: 1 addition & 1 deletion libyul/backends/evm/StackLayoutGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ void StackLayoutGenerator::processEntryPoint(CFG::BasicBlock const& _entry, CFG:
// entry layout of the backwards jump target as the initial exit layout of the backwards-jumping block.
while (!toVisit.empty())
{
CFG::BasicBlock const *block = *toVisit.begin();
CFG::BasicBlock const* block = *toVisit.begin();
toVisit.pop_front();

if (visited.count(block))
Expand Down
4 changes: 2 additions & 2 deletions scripts/check_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ FORMATERROR=$(
preparedGrep "^ [^*]|[^*] | [^*]" # uses spaces for indentation or mixes spaces and tabs
preparedGrep "[a-zA-Z0-9_]\s*[&][a-zA-Z_]" | grep -E -v "return [&]" # right-aligned reference ampersand (needs to exclude return)
# right-aligned reference pointer star (needs to exclude return and comments)
preparedGrep "[a-zA-Z0-9_]\s*[*][a-zA-Z_]" | grep -E -v -e "return [*]" -e "^* [*]" -e "^*//.*"
preparedGrep "[a-zA-Z0-9_]\s*[*][a-zA-Z_]" | grep -E -v -e "return [*]" -e ":[0-9]+:\s*\*\s" -e "//"
# unqualified move()/forward() checks, i.e. make sure that std::move() and std::forward() are used instead of move() and forward()
preparedGrep "move\(.+\)" | grep -v "std::move" | grep -E "[^a-z]move"
preparedGrep "forward\(.+\)" | grep -v "std::forward" | grep -E "[^a-z]forward"
) | grep -E -v -e "^[a-zA-Z\./]*:[0-9]*:\s*\/(\/|\*)" -e "^test/" || true
) | grep -E -v -e "^[a-zA-Z./]*:[0-9]*:\s*/[/*]" -e "^test/" || true
)

# Special error handling for `using namespace std;` exclusion, since said statement can be present in the test directory
Expand Down