Lines Matching defs:stmt
1908 static bool is_block_ending_with_return(const Statement* stmt) {
1910 if (!stmt->is<Block>()) {
1913 const StatementArray& block = stmt->as<Block>().children();
1915 stmt = block[index].get();
1916 if (stmt->is<ReturnStatement>()) {
1919 if (stmt->is<Block>()) {
1920 return is_block_ending_with_return(stmt);
1922 if (!stmt->is<Nop>()) {
1952 for (const std::unique_ptr<Statement>& stmt : f.body()->as<Block>().children()) {
1953 if (!stmt->isEmpty()) {
1954 this->writeStatement(*stmt);
2143 for (const std::unique_ptr<Statement>& stmt : b.children()) {
2144 if (!stmt->isEmpty()) {
2145 this->writeStatement(*stmt);
2155 void MetalCodeGenerator::writeIfStatement(const IfStatement& stmt) {
2157 this->writeExpression(*stmt.test(), Precedence::kTopLevel);
2159 this->writeStatement(*stmt.ifTrue());
2160 if (stmt.ifFalse()) {
2162 this->writeStatement(*stmt.ifFalse());
2206 for (const std::unique_ptr<Statement>& stmt : s.cases()) {
2207 const SwitchCase& c = stmt->as<SwitchCase>();