MCPcopy Create free account
hub / github.com/argotorg/solidity / removeEmptyCasesFromSwitch

Function removeEmptyCasesFromSwitch

libyul/optimiser/ControlFlowSimplifier.cpp:59–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void removeEmptyCasesFromSwitch(Switch& _switchStmt)
60{
61 if (hasDefaultCase(_switchStmt))
62 return;
63
64 ranges::actions::remove_if(
65 _switchStmt.cases,
66 [](Case const& _case) { return _case.body.statements.empty(); }
67 );
68}
69
70}
71

Callers 1

simplifyMethod · 0.85

Calls 2

hasDefaultCaseFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected