[PATCH] [ms-cxxabi] Implement MSVC virtual base adjustment
Reid Kleckner
rnk at google.com
Wed May 29 10:03:35 PDT 2013
Thanks! Committing with 80col issues fixed.
On Tue, May 28, 2013 at 9:47 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
> > + // RD is reusing the vbptr of a non-virtual base. Find it and
> continue.
> > + const CXXRecordDecl *FirstNVBaseWithVBases = 0;
> > + for (CXXRecordDecl::base_class_const_iterator I = RD->bases_begin(),
> > + E = RD->bases_end(); I != E; ++I) {
> > + const CXXRecordDecl *Base = I->getType()->getAsCXXRecordDecl();
> > + if (!I->isVirtual() && Base->getNumVBases() > 0) {
> > + FirstNVBaseWithVBases = Base;
>
> Instead of manually breaking, it might be more clear to make
> FirstNVBaseWithVBases part of the for loop test itself.
>
I actually don't like that because it makes the for loop something other
than the standard C++ iterator idiom. IMO most readers will gloss over it
and assume the exit condition is just 'I != E'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130529/c48de004/attachment.html>
More information about the cfe-commits
mailing list