skia2/resources/sksl/errors/ForInitStmt.sksl
John Stiles 49b409e680 Simplify for init-stmts at the IR level.
Most backends don't like init-stmts with multiple VarDeclarations inside
them, so we no longer emit IR that does this. This lets us avoid doing
backend-level fixups.

Change-Id: Ide839de18953a73e0f9c7a690df59a7bc3523f89
Bug: skia:11860
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398221
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-04-20 14:38:36 +00:00

11 lines
690 B
Plaintext

void test_init_stmt_for() { for (for(;;);; ) {} }
void test_init_stmt_switch() { for (switch(0) {} ; ) {} }
void test_init_stmt_while() { for (while(false) {} ; ) {} }
void test_init_stmt_do() { for (do {} while(false);; ) {} }
void test_init_stmt_if() { for (if (false) {} ; ) {} }
void test_init_stmt_break() { for (break;; ) {} }
void test_init_stmt_continue() { for (continue;; ) {} }
void test_init_stmt_discard() { for (discard;; ) {} }
void test_init_stmt_type() { for (void;; ) {} }
void test_init_stmt_deep() { for (for(for(for(;;);;);;);;) {} }