On Jun 24, 2013, at 20:19 , David Blaikie <[email protected]> wrote:
> On Mon, Jun 24, 2013 at 6:56 PM, Jordan Rose <[email protected]> wrote: >> Author: jrose >> Date: Mon Jun 24 20:55:59 2013 >> New Revision: 184814 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=184814&view=rev >> Log: >> [analyzer] Don't initialize virtual base classes more than once. >> >> In order to make sure virtual base classes are always initialized once, >> the AST contains initializers for the base class in /all/ of its >> descendents, not just the immediate descendents. However, at runtime, >> the most-derived object is responsible for initializing all the virtual >> base classes; all the other initializers will be ignored. >> >> The analyzer now checks to see if it's being called from another base >> constructor, and if so does not perform virtual base initialization. > > Vague/uninformed question: If you modelled the C1/C2/(C3?) ctors as > they exist would this just come out more naturally? (maybe this is a > sufficient model of that) My motivation for doing it this way was that I didn't want to build separate CFGs for the different constructor variants, which will be largely the same. I suppose that's not a major problem, but this seemed simple enough in practice. If more differences start coming up between complete constructors and base constructors in the analyzer's model, I/we can revisit that decision. Jordan _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
