diff --git a/libsolidity/analysis/ControlFlowBuilder.h b/libsolidity/analysis/ControlFlowBuilder.h index 7af843fcaec9..92ebe4f88a2b 100644 --- a/libsolidity/analysis/ControlFlowBuilder.h +++ b/libsolidity/analysis/ControlFlowBuilder.h @@ -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; diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 8556487ff4ca..b54e591d20b2 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -1447,7 +1447,7 @@ void TypeChecker::checkExpressionAssignment(Type const& _type, Expression const& { bool isLocalOrReturn = false; if (auto const* identifier = dynamic_cast(&_expression)) - if (auto const *variableDeclaration = dynamic_cast(identifier->annotation().referencedDeclaration)) + if (auto const* variableDeclaration = dynamic_cast(identifier->annotation().referencedDeclaration)) if (variableDeclaration->isLocalOrReturn()) isLocalOrReturn = true; if (!isLocalOrReturn) diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 316d99ba3edc..8454fd1306d5 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -3474,7 +3474,7 @@ MemberList::MemberMap FunctionType::nativeMembers(ASTNode const* _scope) const if (auto const* functionDefinition = dynamic_cast(m_declaration)) { solAssert(functionDefinition->visibility() > Visibility::Internal, ""); - auto const *contract = dynamic_cast(m_declaration->scope()); + auto const* contract = dynamic_cast(m_declaration->scope()); solAssert(contract, ""); solAssert(contract->isLibrary(), ""); return {{"selector", TypeProvider::fixedBytes(4)}}; diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 638ee6939ca8..49a996c6c829 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -374,7 +374,7 @@ class CompilerContext /// Stack of current visited AST nodes, used for location attachment std::stack 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. diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 2927444e2be3..49313c8925c6 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -2298,7 +2298,7 @@ bool ExpressionCompiler::visit(IndexRangeAccess const& _indexAccess) Type const& baseType = *_indexAccess.baseExpression().annotation().type; - ArrayType const *arrayType = dynamic_cast(&baseType); + ArrayType const* arrayType = dynamic_cast(&baseType); if (!arrayType) if (ArraySliceType const* sliceType = dynamic_cast(&baseType)) arrayType = &sliceType->arrayType(); diff --git a/libyul/backends/evm/StackLayoutGenerator.cpp b/libyul/backends/evm/StackLayoutGenerator.cpp index f6d1108eeb78..9a37adeb25bb 100644 --- a/libyul/backends/evm/StackLayoutGenerator.cpp +++ b/libyul/backends/evm/StackLayoutGenerator.cpp @@ -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)) diff --git a/scripts/check_style.sh b/scripts/check_style.sh index d67f7b60ca22..7188f84f2b33 100755 --- a/scripts/check_style.sh +++ b/scripts/check_style.sh @@ -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