[cfe-commits] r139222 - /cfe/trunk/include/clang/Lex/PreprocessingRecord.h

Douglas Gregor dgregor at apple.com
Tue Sep 6 22:07:27 PDT 2011


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.

	- 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list