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

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Sep 7 14:50:10 PDT 2011


Author: akirtzidis
Date: Wed Sep  7 16:50:10 2011
New Revision: 139261

URL: http://llvm.org/viewvc/llvm-project?rev=139261&view=rev
Log:
Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful
to meet the requirements of the InputIterator concept.

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=139261&r1=139260&r2=139261&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PreprocessingRecord.h (original)
+++ cfe/trunk/include/clang/Lex/PreprocessingRecord.h Wed Sep  7 16:50:10 2011
@@ -336,6 +336,13 @@
           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);





More information about the cfe-commits mailing list