On Thu, Oct 23, 2008 at 9:45 PM, Chris Lattner <[EMAIL PROTECTED]> wrote: > On Oct 23, 2008, at 8:53 AM, Doug Gregor wrote: >> The annoying problem here is that we return CXXBaseSpecifier pointers >> to the parser (as a BaseTy*, which is just a void*), when we'd really >> prefer to just return a CXXBaseSpecifier. Anyway, I'll switch over to >> an array of CXXBaseSpecifiers. > > Your follow-on commit looks like an awesome step, thanks! > > Is there a good way to fix this issue and avoid the new/delete pair in the > common case?
Not that I found. > It probably isn't worth the implementation effort, but one option would be > to have a parser level version of 'CXXBaseSpecifier' and have the parser > aggregate these together into a SmallVector and have Sema handle the whole > list at once. Base specifiers are probably not common enough to go to > heroic measures to optimize, but it's an option. *shrug* It might also be possible to do something akin to the CXXFieldCollector, but for base classes. Then the parser could potentially avoid having any representation of the base specifiers. - Doug _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
