Lines Matching refs:SwitchCase
50 static std::forward_list<const SwitchCase*> find_duplicate_case_values( in find_duplicate_case_values()
52 std::forward_list<const SwitchCase*> duplicateCases; in find_duplicate_case_values()
57 const SwitchCase* sc = &stmt->as<SwitchCase>(); in find_duplicate_case_values()
113 SwitchCase* caseToCapture, in BlockForCase()
120 const SwitchCase& sc = (*iter)->as<SwitchCase>(); in BlockForCase()
132 std::unique_ptr<Statement>& stmt = (*iter)->as<SwitchCase>().statement(); in BlockForCase()
152 caseStmts.push_back(std::move((*startIter)->as<SwitchCase>().statement())); in BlockForCase()
159 SkASSERT((*startIter)->as<SwitchCase>().statement().get() == stripBreakStmt); in BlockForCase()
160 move_all_but_break((*startIter)->as<SwitchCase>().statement(), &caseStmts); in BlockForCase()
209 cases.push_back(std::make_unique<SwitchCase>(caseOffset, std::move(caseValue), in Convert()
215 std::forward_list<const SwitchCase*> duplicateCases = find_duplicate_case_values(cases); in Convert()
218 for (const SwitchCase* sc : duplicateCases) { in Convert()
241 return stmt->is<SwitchCase>(); in Make()
246 return !stmt->as<SwitchCase>().value() || // `default` case has a null value in Make()
247 value->type() == stmt->as<SwitchCase>().value()->type(); in Make()
257 SwitchCase* defaultCase = nullptr; in Make()
258 SwitchCase* matchingCase = nullptr; in Make()
260 SwitchCase& sc = stmt->as<SwitchCase>(); in Make()