Internals: Fix some cppcheck issues. Some dump functions fixed.

This commit is contained in:
Wilson Snyder
2022-07-30 10:01:39 -04:00
parent 1f9323d086
commit b9d7819faa
49 changed files with 192 additions and 174 deletions
+1 -1
View File
@@ -414,7 +414,7 @@ public:
// Given an AstNode list (held via AstNode::nextp()), move conditional statements as close
// together as possible
static AstNode* optimize(AstNode* nodep, const StmtPropertiesAllocator& stmtProperties) {
CodeMotionOptimizeVisitor{nodep, stmtProperties};
{ CodeMotionOptimizeVisitor{nodep, stmtProperties}; }
// It is possible for the head of the list to be moved later such that it is no longer
// in head position. If so, rewind the list and return the new head.
while (nodep->backp()->nextp() == nodep) nodep = nodep->backp();