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

Timur Iskhodzhanov timurrrr at google.com
Mon Mar 31 04:08:32 PDT 2014


2014-03-30 21:46 GMT+04:00 Reid Kleckner <rnk at google.com>:
> 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.

r205178.



More information about the cfe-commits mailing list