MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / InsertIfOrSwitchInitVariables

Method InsertIfOrSwitchInitVariables

CodeGenerator.cpp:2531–2544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2529//-----------------------------------------------------------------------------
2530
2531void CodeGenerator::InsertIfOrSwitchInitVariables(same_as_any_of<const IfStmt, const SwitchStmt> auto* stmt)
2532{
2533 if(const auto* conditionVar = stmt->getConditionVariable()) {
2534 InsertArg(conditionVar);
2535 }
2536
2537 if(const auto* init = stmt->getInit()) {
2538 InsertArg(init);
2539
2540 if(not isa<DeclStmt>(init)) {
2541 mOutputFormatHelper.AppendSemiNewLine();
2542 }
2543 }
2544}
2545//-----------------------------------------------------------------------------
2546
2547void CodeGenerator::InsertArg(const IfStmt* stmt)

Callers

nothing calls this directly

Calls 1

AppendSemiNewLineMethod · 0.80

Tested by

no test coverage detected