]> granicus.if.org Git - clang/commitdiff
Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 7 Sep 2011 21:50:10 +0000 (21:50 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 7 Sep 2011 21:50:10 +0000 (21:50 +0000)
to meet the requirements of the InputIterator concept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139261 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/PreprocessingRecord.h

index e12e201e67c259deb9dbc56d49e137133770bdf9..7bcc962739e0a88914d2bc31901334d88858c5d3 100644 (file)
@@ -336,6 +336,13 @@ namespace clang {
           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);