Hi Marcin,

There are some bugs in your patch. I tested with the code attached. The
printed CFG has some errors in block B2.

I'll look at the patch to try to locate the bug.

2010/9/28 Marcin Świderski <[email protected]>

> Patch adds implicit destructors generation for objects with automatic
> storage duration. Patch is rather big, but it contains all cases (that I
> thought of), as it will be easier to review as a whole IMO. While commiting
> I can divide it to smaller chuncks.
>
> I've added some test cases. They can be later used to create regresion
> tests.
>
> Please approve for commit.
>
> Marcin
>

Attachment: cfg.pdf
Description: Adobe PDF document

#include <cstdio>
struct A {
  A() { printf("A()\n"); }
  ~A() { printf("~A()\n"); }
};

int main(int argc, char ** argv) {
  A x;

  {
    A y;
    int n;
    {
      A z;
      if (argc == 1)
        goto foo;
      else {
        int x;
        x = 3;
      }
    }
    n = 3;
  foo:
    printf("after goto\n");
  }
  return 0;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to