void test_loop()

in cpp/DFAchecks.cpp [120:143]


void test_loop() {

    for (int i = 0; i < 10;) {
        if (i > 5)
            break;
    }

    {
        int x = 10;
        while (x > 0) {
            int &ref = {x};
            --ref;
        }
    }

    {
        int x = 10;
        int *p = &x;
        ([p, x]() {
            while (x > 0)
                *p = 0;
        })();
    }
}