r204744 - MS ABI: Mark direct virtual bases as visted when building vtable paths

Reid Kleckner rnk at google.com
Sun Mar 30 10:46:58 PDT 2014


On Wed, Mar 26, 2014 at 1:30 AM, Timur Iskhodzhanov <timurrrr at google.com>wrote:

>
> 2014-03-25 22:33 GMT+04:00 Reid Kleckner <reid at kleckner.net>:
>
> --- cfe/trunk/lib/AST/VTableBuilder.cpp (original)
>> +++ cfe/trunk/lib/AST/VTableBuilder.cpp Tue Mar 25 13:33:27 2014
>> @@ -3210,6 +3210,8 @@ void MicrosoftVTableContext::computeVTab
>>      // morally virtual bases.
>>      for (const auto &I : Base->vbases())
>>        VBasesSeen.insert(I.getType()->getAsCXXRecordDecl());
>> +    if (I.isVirtual())
>> +      VBasesSeen.insert(Base);
>>    }
>>
>
> Wow, that revealed that we have a variable name shadowing going on here!
> Fixed in r204787.
>

Yes, when using the new for each loop syntax, I really prefer using
meaningful names instead of I.  I think we've only been using I for
iterators and indices because they're this cruddy little implementation
detail that we'd rather skip over and forget about.  :)


> I also kinda think the if() is more logical/readable to go before for().
> WDYT?
>

Sure.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140330/afe23f04/attachment.html>


More information about the cfe-commits mailing list