]> granicus.if.org Git - clang/commitdiff
One last RandomAccessIterator operator for PreprocessingRecord::iterator
authorDouglas Gregor <dgregor@apple.com>
Thu, 21 Jul 2011 16:37:44 +0000 (16:37 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 21 Jul 2011 16:37:44 +0000 (16:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135680 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/PreprocessingRecord.h

index 22ac57152f684e4f8e340369d1a8fc6717b4e31e..f454ca96cae4841a9ac407b02de3cbd88bec79f9 100644 (file)
@@ -419,6 +419,11 @@ namespace clang {
       friend difference_type operator-(const iterator &X, const iterator &Y) {
         return X.Position - Y.Position;
       }
+
+      friend iterator operator-(iterator X, difference_type D) {
+        X.Position -= D;
+        return X;
+      }
     };
     friend class iterator;