| 2501 | //----------------------------------------------------------------------------- |
| 2502 | |
| 2503 | void CodeGenerator::HandleCompoundStmt(const CompoundStmt* stmt) |
| 2504 | { |
| 2505 | for(const auto* item : stmt->body()) { |
| 2506 | InsertArg(item); |
| 2507 | |
| 2508 | // Skip inserting a semicolon, if this is a LambdaExpr and out stack is empty. This addresses a special case |
| 2509 | // #344. |
| 2510 | const bool skipSemiForLambda{mLambdaStack.empty() and isa<LambdaExpr>(item)}; |
| 2511 | |
| 2512 | if(IsStmtRequiringSemi<IfStmt, |
| 2513 | NullStmt, |
| 2514 | ForStmt, |
| 2515 | DeclStmt, |
| 2516 | WhileStmt, |
| 2517 | DoStmt, |
| 2518 | CXXForRangeStmt, |
| 2519 | SwitchStmt, |
| 2520 | CXXTryStmt, |
| 2521 | CppInsightsCommentStmt>(item) and |
| 2522 | InsertSemi() and not skipSemiForLambda and not mSkipSemi) { |
| 2523 | mOutputFormatHelper.AppendSemiNewLine(); |
| 2524 | } |
| 2525 | |
| 2526 | mSkipSemi = false; |
| 2527 | } |
| 2528 | } |
| 2529 | //----------------------------------------------------------------------------- |
| 2530 | |
| 2531 | void CodeGenerator::InsertIfOrSwitchInitVariables(same_as_any_of<const IfStmt, const SwitchStmt> auto* stmt) |
nothing calls this directly
no test coverage detected