On Sep 6, 2011, at 10:07 PM, Douglas Gregor wrote:

> 
> On Sep 6, 2011, at 8:43 PM, Argyrios Kyrtzidis wrote:
> 
>> Author: akirtzidis
>> Date: Tue Sep  6 22:43:39 2011
>> New Revision: 139222
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=139222&view=rev
>> Log:
>> operator->() in PreprocessingRecord::iterator is useless since we
>> are returning a pointer to pointer.
> 
> It's there to meet the requirements of the InputIterator concept.

It seemed less convenient to implement after some changes but in retrospect 
this is not the case, I'll put it back.

But how about changing PreprocessingRecord::iterator::value_type from 
PreprocessedEntity * to PreprocessedEntity ? That iterator is not supposed to 
ever return a null PreprocessedEntity * anyway.

> 
>       - Doug
> 
>> Modified:
>>   cfe/trunk/include/clang/Lex/PreprocessingRecord.h
>> 
>> Modified: cfe/trunk/include/clang/Lex/PreprocessingRecord.h
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PreprocessingRecord.h?rev=139222&r1=139221&r2=139222&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Lex/PreprocessingRecord.h (original)
>> +++ cfe/trunk/include/clang/Lex/PreprocessingRecord.h Tue Sep  6 22:43:39 
>> 2011
>> @@ -336,13 +336,6 @@
>>          return Self->LoadedPreprocessedEntities.end()[Position];
>>        return Self->PreprocessedEntities[Position];
>>      }
>> -    
>> -      pointer operator->() const {
>> -        if (Position < 0)
>> -          return &Self->LoadedPreprocessedEntities.end()[Position];
>> -        
>> -        return &Self->PreprocessedEntities[Position];        
>> -      }
>> 
>>      reference operator[](difference_type D) {
>>        return *(*this + D);
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to