2010/9/18 Zhongxing Xu <[email protected]> > This patch adds automatic variable's dtors to the CFG. It uses LocalScope > to > record the automatic variables in each scope. When building the CFG, > CleanupPoints are inserted at ReturnStmt, CompoundStmt and GotoStmt. > > After the building process, dtors are inserted into the cleanup points. > > To hook up the LocalScope when entering a CompoundStmt, now autoCreate a > block. > This may potentially create redundant blocks. But I think it's easy to > remove > them. > > Some code is tricky. It is so to guarantee the correct order the dtors are > inserted. I'm not sure they are the best approach. > > Later we would add an option to control the CFG build option. Currently > adding implicit dtors are disabled. If it is enabled, some c++ test cases > would > fail. > > Some test cases that this patch can handle are attached. They can be tested > by changing > > if (BuildOpts.AddImplicitDtors) { > > to > > if (true) { > > I don't want to be rude, but I don't like that you've hijacked topic I was working on. Is this normal practice on this project? If you (or somebody else) thinks that I shouldn't work on this please contact me before doubling my work.
As for the patch I see no handling of: - implicit scopes in if/else/for/while/do/switch, - condition variables in if/while/for/switch, - temporaries with lifetime extended by binding to const reference. Marcin
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
